Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!udel!haven!adm!lhc!usenet From: usenet@nlm.nih.gov (usenet news poster) Newsgroups: comp.lang.c Subject: Re: Func Protos with K&R Func Defs Message-ID: <1991Mar1.030739.9683@nlm.nih.gov> Date: 1 Mar 91 03:07:39 GMT References: <11614@jpl-devvax.JPL.NASA.GOV> Reply-To: gish@host.NLM.NIH.GOV (Warren Gish) Organization: National Library of Medicine, Bethesda, Md. Lines: 35 In article <11614@jpl-devvax.JPL.NASA.GOV> david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) writes: >I do this all the time: >in WcCreate.h: > #ifdef _FUNCTION_PROTOTYPES > ... > extern void WcWidgetCreation ( Widget root ); > ... > #else > ... > extern void WcWidgetCreation(); > ... > #endif Better still: #ifdef _FUNCTION_PROTOTYPES #define PROTO(x) x #else #define PROTO(x) #endif extern void WcWidgetCreation PROTO((Widget root)); extern void WcWidgetCompaction PROTO((Widget leaves)); extern void WcWidgetDestruction PROTO((Widget branches)); extern void WcWidgetDemolition PROTO((Widget knots, Widget tegdiw, ...)); extern void WcWidgetEmulation PROTO((Widget worms)); Warren Gish phone: (301) 496-2475 National Center FAX: (301) 480-9241 for Biotechnology Information Internet: gish@ncbi.nlm.nih.gov National Library of Medicine Building 38A, Room 8S-806 8600 Rockville Pike Bethesda, MD 20894-0001