Xref: utzoo comp.std.c:1102 comp.lang.c:18124 Path: 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 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". | +---------------------------+------------------------+-------------------+