Replace a home-grown printf() clone with a fwopen() wrapper around
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 14 Jan 2007 05:12:40 +0000 (05:12 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 14 Jan 2007 05:12:40 +0000 (05:12 +0000)
commit7e531be7044263fc4f32de4a98c394532d49507c
treecb4c63ff1234de077ccde7b2f5bb82033ad2e9e4
parent675605958e27abb48f9fb925a91376d61a3f7637
Replace a home-grown printf() clone with a fwopen() wrapper around
libc's vfprintf() that writes to a `struct output' instead of a file.

Print empty quotes ('') when an empty string is passed to outqstr().
This makes a difference for the trap builtin, where after "trap '' 0" we
printed "trap -- quit".  This is wrong, because an empty action means to reset
the action to the default.  A side effect of this commit is that empty
variables are now printed as "variable=''" instead of just "variable=".

Obtained-from:  FreeBSD
bin/sh/output.c