🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #262

Re: Reserved names in ANSI C

#262
From: Martin Minow
Date: Wed, 21 Jun 1989 18:35
23 lines
1717 bytes
Kenneth Almquist asks what namespace is reserved by Ansi C.

Several people responded with various lexical patterns.  Unfortunately,
none of the Drafts I've seen ever specified the totality of the namespace.
We know that the C keywords and anything beginning with underscore are
reserved, but there does not seem to be a limit on the library namespace.
When I complained about this in one of the public reviews, I was told that
this was for "Posix compliance."

I suspect that the namespace will continue to grow without bound, and the
best you can do to avoid polluting (or being polluted) is to define all
of your variables using some "private" initial sequence:

	extern int	my_private_global_foo;
	static int	my_private_local_bar;

(I have much the same problem on the Macintosh, and define all of my
variables in lower-case with an embedded underscore to avoid Macintosh
system definitions, most of which use mixed case without underscores.)

Martin Minow
minow%thundr.dec@decwrl.dec.com
The above does not represent the position of Digital Equipment Corporation.
Technical Details
Message-ID: <316@mountn.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!sun-barr!decwrl!shlump.dec.com!mountn.dec.com!minow
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk> <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM> <875@cbnewsl.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!sun-barr!decwrl!shlump.dec.com!mountn.dec.com!minow
From: minow@mountn.dec.com (Martin Minow)
Newsgroups: comp.std.c
Subject: Re: Reserved names in ANSI C
Summary: [A-Za-z][A-Za-z0-9_]* with optional leading underscores
Message-ID: <316@mountn.dec.com>
Date: 21 Jun 89 18:35:38 GMT
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk> <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM> <875@cbnewsl.ATT.COM>
Reply-To: minow%thundr.dec@decwrl.dec.com (Martin Minow)
Organization: Digital Equipment Corporation
Lines: 23