Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!usc!ginosko!simkin From: simkin@ginosko.samsung.com (Rick Simkin) Newsgroups: comp.windows.x Subject: Function prototypes in .h files Keywords: C prototypes, conditional, conversion, header files Message-ID: <3271@ginosko.samsung.com> Date: 6 Sep 89 14:02:22 GMT Organization: Samsung Software America, Inc. Lines: 33 I'm working with a C compiler which requires function prototypes, and have just spent a day converting released X header files to include this information. Sample original code: extern void XtStringConversionWarning(); /* String from; */ /* String attempted to convert. */ /* String toType; */ /* Type attempted to convert it to. */ Converted into function prototypes: extern void XtStringConversionWarning( #ifdef NEED_PROTOTYPE String from, /* String attempted to convert. */ String toType /* Type attempted to convert it to. */ #endif ); The converted code will still work with a compiler that doesn't understand function prototypes, but defining NEED_PROTOTYPE will satisfy the compiler that requires them. Oh please, X people, could the X header files be modified along these lines in the next release, to save lots of reconversions in the future? ------------------------------------------------------------------------------- Rick Simkin || Phone: +1 (508) 685-7200 x134 (fax 685-4940) Samsung Software America, Inc. || Internet: simkin@samsung.com 1 Corporate Drive || UUCP: {uunet,ulowell}!ginosko!simkin Andover, Mass. 01810 USA || decvax!bu-tyng!ulowell!ginosko!simkin -------------Any opinions expressed are my own, not my employer's.-------------