Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!decwrl!bacchus.pa.dec.com!deccrl!decvax.dec.com!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: varargs functions: calling and prototyping Keywords: varargs, prototypes Message-ID: <17157@haddock.ima.isc.com> Date: 27 Jul 90 00:57:43 GMT References: <1990Jul25.195944.9238@DRD.Com> Reply-To: karl@kelp.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 12 In article <1990Jul25.195944.9238@DRD.Com> mark@drd.Com (Mark Lawrence) writes: >[A function defined with the macros fails to match its prototype] Don't use in ANSI C. Use instead. >do I need to provide a terminating NULL when calling this function Not in this case. The function that ultimately parses the variadic part is vsprintf, and it uses the format string, rather than a sentinel value, to detect the end of the list. Karl W. Z. Heuer (karl@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint