🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #64293

Re: xBin library header

#64293
From: Russ Allbery
Date: Thu, 06 Mar 2003 18:12
24 lines
1873 bytes
Chris <nobody@rogers.com> writes:

> #ifndef __xbin_h__
> #define __xbin_h__

A side note not related to the rest of your post:

This is a common but technically incorrect way of doing header guards.  At
least in ISO C, and I believe in ISO C++ as well, all identifiers
beginning with __ or with _ and a capital letter are reserved for the
implementation.  That means that user code is not supposed to use such
identifiers anywhere, since you may be trampling on identifiers used by
the compiler.

_xbin_h_ would be okay.  I generally just use XBIN_H without any
underscores, relying on the _H to keep header guard macros out of the way
of other things.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <ylwujc1i0b.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <pan.2003.03.06.16.36.27.43643@rogers.com>

Show Full Headers
Complete Article Headers
Message-ID: <ylwujc1i0b.fsf@windlord.stanford.edu>
Subject: Re: xBin library header
Date: Thu, 06 Mar 2003 10:12:36 -0800
From: Russ Allbery <rra@stanford.edu>
References: <pan.2003.03.06.16.36.27.43643@rogers.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 23
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1046974356 19097 171.64.13.23 (6 Mar 2003 18:12:36 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Honest Recruiter,
 sparc-sun-solaris2.6)
Cancel-Lock: sha1:ecZwmxWl7C9GITOREIJtcJhSUeI=