Reality check
Karl Heuer
karl at ima.isc.com
Thu Nov 15 06:39:30 AEST 1990
In <108329 at convex.convex.com> gargulak at mozart.convex.com (Tom Gargulak) writes:
>karl at ima.isc.com (Karl Heuer) writes:
>>[My <stdarg.h>] even works on pre-ANSI compilers, so I can take code written
>>with ANSI prototypes and <stdarg.h> and simply deprotoize it without having
>>to worry about converting <stdarg.h> to <varargs.h>.
>
>[What about ellipsis?]
The ellipsis is part of the function prototype, and so is removed by the
deprotoizer:
int printf(char const *fmt, ...) { /* as stored in source file */
int printf(fmt) char *fmt; { /* after deproto and -Dconst="" */
which is acceptable to the Classic C compiler. <stdarg.h> says
#define va_start(ap, parmN) (ap = (char *)&parmN + sizeof(parmN))
in the typical implementation.
Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint
More information about the Comp.std.c
mailing list