Novic C programmer needs help

Karl Heuer karl at haddock.ima.isc.com
Thu Feb 15 12:27:31 AEST 1990


In article <420 at wattres.UUCP> steve at wattres.UUCP (Steve Watt) writes:
>The entire piece of code, however, is *awful*!!!!!!  If there is a varargs
>package around, there tends to be a vsprintf around!  vsprintf is the very
>correct way of doing this sort of thing.  Depending on having _doprnt around
>is NOT NICE!

You are mistaken about the chronology.  <varargs.h> and _doprnt() date back to
V7, while the v*printf() family is a relatively recent invention (SVR2, I
think; 4.3BSD still doesn't have it except in SysV compatibility mode).  Any
printf-like code that was written within that window had to use _doprnt(), or
pass a fixed number of arguments to sprintf() directly, or reinvent the
printf() wheel from scratch.

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list