Replace a home-grown printf() clone with a fwopen() wrapper around
commit28ee32953c86447e0e575318c1f16acbf2d15003
authorpavalos <pavalos>
Sun, 14 Jan 2007 05:12:40 +0000 (14 05:12 +0000)
committerpavalos <pavalos>
Sun, 14 Jan 2007 05:12:40 +0000 (14 05:12 +0000)
tree9f0dea5e6ae0cf536881bfd702b00e9c6a7a9af9
parent46236068a5236b1e6b4ac235f3b3db98fb23bdd4
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