From roebuck at odin.mdacc.tmc.edu  Wed May 18 23:23:19 2005
From: roebuck at odin.mdacc.tmc.edu (Paul Roebuck)
Date: Wed May 18 23:23:31 2005
Subject: [Rd] R Include File Guards
In-Reply-To: <Pine.LNX.4.61.0505182203080.14721@gannet.stats>
References: <Pine.OSF.4.58.0505181524160.204610@odin.mdacc.tmc.edu>
	<Pine.LNX.4.61.0505182203080.14721@gannet.stats>
Message-ID: <Pine.OSF.4.58.0505181611520.204610@odin.mdacc.tmc.edu>

On Wed, 18 May 2005, Prof Brian Ripley wrote:

> On Wed, 18 May 2005, Paul Roebuck wrote:
>
> > R 2.1.0/src/include from 2005/04/18 download
> >
> > Naming inconsistent for guards as well but that's pedantic.
> > Simple convention:
> >  file <foo.h>
> >    #ifndef R_FOO_H
> >  file <R_ext/bar.h>
> >    #ifndef R_EXT_BAR_H
> >
> > Missing guards:
> > <IOStuff.h>
> > <Internal.h>
> > <Parse.h>
> > <R_ext/GraphicsBase.h>
> > <R_ext/GraphicsDevice.h>
> > <R_ext/GraphicsEngine.h>
> > <R_ext/R-ftp-http.h>
> > <R_ext/libextern.h>
> >
> >
> > Illegal Guards (leading underscore):
> > <Rinternals.h>
> > <R_ext/Error.h>
> > <config.h.in>
>
> What is `illegal' about that?

ANSI C standard reserves identifiers that begin with
underscore followed by capital letter for implementation.
Strictly speaking, if a program uses such an identifier,
it's behavior is undefined.

<http://docs.hp.com/en/B9106-90012/stdsyms.5.html>
<http://docs.sun.com/app/docs/doc/802-2124/6i6425cof?a=view>
<http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_1.html>

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)


[Rd] R Include File Guards
Paul Roebuck