🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3148

Re: <varargs.h> vs. function prototypes

#3148
From: Chris Torek
Date: Tue, 18 Jun 1991 19:04
27 lines
1597 bytes
>In article <159364@pyramid.pyramid.com> markhall@pyrps5.pyramid.com
>(Mark Hall) writes:
>>	#ifdef __STDC__
>>	void foo(char *format, ...)
>>	#else
>>	void foo(format, va_alist) char *format; va_dcl
>>	#endif
[and on from there]

In article <1991Jun18.145823.2512@cbnewsk.att.com> hansen@pegasus.att.com
(Tony L. Hansen) writes:
>The above form for <varargs.h> usage is wrong. ...

This is correct; however, I have used the above, and continue to use it,
in 4BSD code, with the excuse that:

 a) it is far clearer; and
 b) if your varargs does not handle it, you can probably obtain an ANSI C
    implementation and use the __STDC__ code anyway.

In other words, we are not willing to bend over backwards (for compatibility)
until it hurts, only until it is mildly uncomfortable. :-)

Chris
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov
Technical Details
Message-ID: <14423@dog.ee.lbl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!pasteur!dog.ee.lbl.gov!elf.ee.lbl.gov!torek
References: <25353@oolong.la.locus.com> <159364@pyramid.pyramid.com> <1991Jun18.145823.2512@cbnewsk.att.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!pasteur!dog.ee.lbl.gov!elf.ee.lbl.gov!torek
From: torek@elf.ee.lbl.gov (Chris Torek)
Newsgroups: comp.std.c
Subject: Re: <varargs.h> vs. function prototypes
Keywords: <varargs.h> usage
Message-ID: <14423@dog.ee.lbl.gov>
Date: 18 Jun 91 19:04:06 GMT
References: <25353@oolong.la.locus.com> <159364@pyramid.pyramid.com> <1991Jun18.145823.2512@cbnewsk.att.com>
Reply-To: torek@elf.ee.lbl.gov (Chris Torek)
Distribution: na
Organization: Lawrence Berkeley Laboratory, Berkeley
Lines: 27
X-Local-Date: Tue, 18 Jun 91 12:04:06 PDT