Message-ID: <3F1F823D.100FED69@acm.org> From: Eric Sosman X-Mailer: Mozilla 4.72 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: malloc question. References: <84e4e2a9 DOT 0307230454 DOT 730046e5 AT posting DOT google DOT com> <84e4e2a9 DOT 0307231619 DOT 53a48663 AT posting DOT google DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 28 Date: Thu, 24 Jul 2003 11:51:04 GMT NNTP-Posting-Host: 12.91.3.172 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1059047464 12.91.3.172 (Thu, 24 Jul 2003 11:51:04 GMT) NNTP-Posting-Date: Thu, 24 Jul 2003 11:51:04 GMT Organization: AT&T Worldnet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Joel wrote: > > Hans-Bernhard Broeker wrote in message news:... > > Joel wrote: > > > From here > > > http://www.delorie.com/djgpp/doc/ug/graphics/vbe20.html > > > I used code to get protected mode function offsets. And instead of > > > using vesa_pm_info I just called it VESA_PM. > > > > Please re-think that decision. By ancient tradition in both C and > > C++, NAMES_IN_ALL_CAPS are reserved for #define'd macros and possibly > > enum labels. You'll mislead anyone else who may get to read your code > > later. > > > Didn't realize about the all caps rule, thanks for the info. It isn't really a "rule," but more of an "accepted practice, subject to sensible exceptions." For example, C's header provides a definition for something called a `FILE' that is quite often a struct, not a macro; defines `assert' which is *required* to be a macro despite the lower-case name; and so on. Still, if you follow this convention "most of the time" your code will be somewhat easier for a human reader to understand. -- Eric Sosman esosman AT acm DOT org