Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: C Style Message-ID: <9451@smoke.BRL.MIL> Date: 20 Jan 89 15:27:09 GMT References: <2688@ficc.uu.net> <9336@smoke.BRL.MIL> <2700@ficc.uu.net> <9345@smoke.BRL.MIL> <918@philmds.UUCP> <9361@smoke.BRL.MIL> <925@philmds.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <925@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: >Global functions are prefixed with a 3 letter & underscore prefix, the >3 letters identifying the module. Four of the six guaranteed significant characters seems like too great a price. We use 2-character "package prefixes"; e.g. MmAllo where "Mm" denotes the "Memory manager" package and "Allo" is of course the specific function of "Allocation". This has worked well for me over the decades. >The header file that exports the module's global functions, variables, >types & macros (and is included by the module itself and all others >that use the module) defines the symbol QUE to prevent multiple inclusion. Short macros like that worry me, because the probability of conflict with some other use seems too great. Our package interface definition header for the "Mm" package uses the symbol MmH_INCLUDED, which is practically certain not to clash with anybody else.