Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ukma!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: varargs vs. prototypes Message-ID: <10380@smoke.BRL.MIL> Date: 8 Jun 89 20:08:58 GMT References: <237@pink.ACA.MCC.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <237@pink.ACA.MCC.COM> rfg@MCC.COM (Ron Guilmette) writes: >Old (non-prototype) function declarations & definitions have >been depreciated right? So we really should *not* be using >the old style anymore right? We should do everything with >prototypes right? If you don't care about non standard-conforming implementations, then you should use prototypes. Otherwise, you should use the __STDC__ predefined macro to select whether to use prototypes or old-style declarations. Some clever tricks to assist in this have been previously posted, but you can do it the obvious way.. >So how can I write a function definition for a varargs function >using prototypes? Is this possible? #include ret_type func_name( type1 fixed_arg1, typen fixed_argn, ... ) { /* stuff using the va_* macros defined by */ }