Article View: comp.std.c
Article #5952Prototypes (variable # of arguments)
From: Anton Rang
Date: Fri, 28 Apr 1989 19:33
Date: Fri, 28 Apr 1989 19:33
15 lines
1268 bytes
1268 bytes
Is it possible to declare a prototype with an "optional" final argument? I'm trying to do a prototype for BSD's "open", which takes either 2 or 3 arguments. At the moment, I have: 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)? +---------------------------+------------------------+-------------------+ | Anton Rang (grad student) | "VMS Forever!" | VOTE on | | Michigan State University | rang@cpswh.cps.msu.edu | rec.music.newage! | +---------------------------+------------------------+-------------------+ | Send votes for/against rec.music.newage to "rang@cpswh.cps.msu.edu". | +---------------------------+------------------------+-------------------+
Technical Details
Message-ID:
<2775@cps3xx.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!eecae!cps3xx!rangShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!eecae!cps3xx!rang From: rang@cpsin3.cps.msu.edu (Anton Rang) Newsgroups: comp.std.c,comp.lang.c Subject: Prototypes (variable # of arguments) Summary: Can I declare a "2 or 3" argument function? Message-ID: <2775@cps3xx.UUCP> Date: 28 Apr 89 19:33:28 GMT Sender: usenet@cps3xx.UUCP Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Organization: Michigan State University, Computer Science Dept. Lines: 15