rsalz@bbn.com (Rich Salz) (10/29/89)
Person a: The best solution would be to have /* /* */ generate a warning. In article <14811@bfmny0.UU.NET> tneff@bfmny0.UU.NET (Tom Neff) writes: Again -- this is a common usage in config.h type files. /* #define BSD4_3 /* for BSD 4.3 systems */ In <15014@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >The best solution is for this to be an option. Then people who use the above >grotesqueness can disable the warning, and those of us who use a more sensible >style can enable it and have the benefit of the improved error checking. Well, la-de-da. When doing "multiple choice" #define's it is usually the most portable way. For example, from my news/mail gateway code: /* Where does the control file for talk.foo live? * IN_ONEPLACE: specified filename * IN_SPOOLDIR: /usr/spool/news/talk/foo/recnews.cmd * IN_CMDDIR: /usr/lib/news/.admin/talk.foo * Required, but you can set IN_ONEPLACE to /dev/null to disable it. */ /*efine IN_ONEPLACE "/dev/null" /* .. */ /*efine IN_SPOOLDIR "/usr/spool/news" /* .. */ #define IN_CMDDIR "/usr/lib/news/.admin" /* .. */ Doesn't seem grotesque to me. As moderator of comp.sources.unix I see it all the time, and encourage it. /r$ -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.