Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!gem.mps.ohio-state.edu!ginosko!uunet!bfmny0!tneff From: tneff@bfmny0.UU.NET (Tom Neff) Newsgroups: comp.lang.c Subject: Redefining keywords (was Re: effect of free() Message-ID: <14694@bfmny0.UU.NET> Date: 18 Sep 89 19:30:03 GMT References: <254@bbxeng.UUCP> <10829@riks.csl.sony.co.jp> <102@bbxsda.UUCP> Reply-To: tneff@bfmny0.UU.NET (Tom Neff) Organization: ^ Lines: 27 Summary: Expires: Sender: Followup-To: Distribution: Keywords: When one wants to use or not use reserved keywords conditionally depending on the choice of platform, a portable approach is to use lookalike non-reserved keywords which are #defined to the null string or to the reserved keywords as needed, e.g. #ifdef I86 #define NEAR near #define FAR far #else #define NEAR #define FAR #endif . . . extern FAR char *idstring; . . . int NEAR *gettotal(int xflag) This is far safer than trying to redefine "near" and "far" themselves. I cannot sympathize with slightly lazy vendors here. -- 'We have luck only with women -- \\\ Tom Neff not spacecraft!' *-((O tneff@bfmny0.UU.NET -- R. Kremnev, builder of FOBOS \\\ uunet!bfmny0!tneff (UUCP)