var args
Ken Turkowski
ken at turtleva.UUCP
Tue Oct 25 03:48:57 AEST 1983
Another way to get portable error message routines is to assume that
there will be a maximum number of arguments.
error(fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)
char *fmt;
int arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10;
{
fprintf(stderr, fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7,
arg8, arg9, arg10)
}
The only time that this wouldn't work is if the arguments were put on
the stack in the reverse order that they normally are in C.
Ken Turkowski
CADLINC, Palo Alto
{decwrl,amd70}!turtlevax!ken
More information about the Comp.lang.c
mailing list