Prototypes (variable # of arguments)

Karl Heuer karl at haddock.ima.isc.com
Sun Apr 30 10:52:50 AEST 1989


In article <2775 at cps3xx.UUCP> rang at cpswh.cps.msu.edu (Anton Rang) writes:
>I'm trying to do a prototype for BSD's "open"

BSD?  I thought AT&T was to blame for that mistake.

>	extern int open(char *, int, ...);
>Is there any way to limit this to only take 2 or 3 arguments (as
>opposed to 2 or more)?

No.  The prototype you gave is the best possible under the circumstances.
(Except that the first arg should be declared with "const".)

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.std.c mailing list