need info: %r in printf

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Fri Oct 14 09:15:58 AEST 1983


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

printf %r was removed in UNIX System III.  If I remember right, it was
a means of embedding a format spec ((char *) corresponding to the %r
in the main format spec) within the main format spec.  One way to
do this would be to assemble the "real" format spec with sprintf into
a char buffer (maybe strcats would be easier), then use that buffer as
the printf main format spec.

If you have code that is using printf %r, you should also be alert for
use of sprintf return value as a (char *); this was also changed in
System III.



More information about the Comp.unix.wizards mailing list