What ever happened to %r in printf ?
Larry Cipriani
lvc at danews.UUCP
Fri May 30 06:21:38 AEST 1986
Does anyone know why the %r formatting option of printf was
never documented on older UNIX systems ? It doesn't exist
on the Sys 5 Rel 2 we have.
This option lets you do things like:
doprint("usage: %s: not found", argv[0]);
and for doprint we have:
doprint(fmt)
char *fmt;
{
stuff ...
printf("%r", &fmt);
other stuff ...
}
The %r tells printf to use &fmt as the address of a
printf formatting string, and to get the arguments
for it off the stack. I don't know if it would
work if fmt contained another %r. Can vprintf be
used to produce the same result ?
Thanks,
--
Larry Cipriani AT&T Network Systems
danews!lvc Mail responses to ihnp4!cbsck!lvc please - thanks
"Nothing is worse than an itch you can never scratch."
More information about the Comp.lang.c
mailing list