www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/15/01:46:39

From: "Andrew Jones" <luminous-is AT home DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <886bi1$2l0$1 AT cubacola DOT tninet DOT se> <jUyp4.37954$45 DOT 2075784 AT news2 DOT rdc1 DOT on DOT home DOT com> <38A6F842 DOT 1733F407 AT ou DOT edu>
Subject: Re: Values in header ?? (urgent)
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <om4q4.45705$45.2399588@news2.rdc1.on.home.com>
Date: Tue, 15 Feb 2000 04:12:04 GMT
NNTP-Posting-Host: 24.42.120.18
X-Complaints-To: abuse AT home DOT net
X-Trace: news2.rdc1.on.home.com 950587924 24.42.120.18 (Mon, 14 Feb 2000 20:12:04 PST)
NNTP-Posting-Date: Mon, 14 Feb 2000 20:12:04 PST
Organization: @Home Network Canada
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> I was wondering why you can do this when I was told just a few weeks ago
> that I shouldn't use the underscore character in my header declaration.
> ie, In your example, I shouldn't use __example_h_ , everyone told me
> that it should be changed to example_h_ in order to use good programming
> style.  Please, I would just like an explanation of why I was told
> this.  Thanks for your time.

If I recall correctly, it -is- considered a no no, and I probably shouldn't
have used that as an example, but I've been writing a DJGPP DPMI compatible API
library for Watcom C, and tried to make everything as DJGPP'ish as I could.
The reason you shouldn't prefix symbols (either preprocessor or
variables/functions), is because a lot of system calls usually begin with the
underscore.  It's sort of unofficially reserved for the compiler
implementation.  If you do do it, you just have to be careful you aren't
redefining a symbol that's already part of your particular implementation.  I
feel I can get away with this, because I know Watcom fairly well. :)

AndrewJ


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019