Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!decwrl!turtleva!ken From: ken@turtleva.UUCP (Ken Turkowski) Newsgroups: net.lang.c Subject: Re: var args Message-ID: <240@turtleva.UUCP> Date: Mon, 24-Oct-83 13:48:57 EDT Article-I.D.: turtleva.240 Posted: Mon Oct 24 13:48:57 1983 Date-Received: Tue, 25-Oct-83 03:36:43 EDT References: utzoo.3272 Lines: 17 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