🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #260

Re: Reserved names in ANSI C

#260
From: T. William Wells
Date: Wed, 21 Jun 1989 09:04
32 lines
1599 bytes
In article <1598@cbnewsh.ATT.COM> ka@hulk.att.com writes:
: karl@haddock.ima.isc.com (Karl Heuer) writes:
: > Technically this is illegal because the str* namespace is reserved...
:
: I know that ANSI C reserves all names that begin with and underscore,
: and I just learned from the above quote that it reserves all names
: beginning with "str".  Are there other names to be avoided as well?

Yes. From reading section 4.13:

	E[0-9A-Z].*     macros in errno.h
	is[a-z].*       externals, ctype.h
	to[a-z].*       externals, ctype.h
	LC_[A-Z].*      macros in locale.h
	<func>f         <func> is any function defined in math.h
	<func>l         <func> is any function defined in math.h
	SIG[A-Z].*      macros in signal.h
	SIG_[A-Z].*     macros in signal.h
	str[a-z].*      externals, stdlib.h and string.h
	mem[a-z].*      externals, string.h
	wcs[a-z].*      externals, string.h

No doubt there are others scattered throughout the spec, but I
haven't the will to go hunting for them.

Can you say "name space pollution"?

Good!

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill@twwells.com
Technical Details
Message-ID: <1989Jun21.090428.9636@twwells.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ukma!uflorida!novavax!twwells!bill
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk> <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ukma!uflorida!novavax!twwells!bill
From: bill@twwells.com (T. William Wells)
Newsgroups: comp.std.c
Subject: Re: Reserved names in ANSI C
Message-ID: <1989Jun21.090428.9636@twwells.com>
Date: 21 Jun 89 09:04:28 GMT
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk> <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM>
Organization: None, Ft. Lauderdale, FL
Lines: 32