🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #261

Re: Reserved names in ANSI C

#261
From: david.f.prosser
Date: Wed, 21 Jun 1989 13:34
23 lines
1522 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?
>				Kenneth Almquist

Section 4.1.2.1 of the pANS goes into some detail about what is reserved
in varying circumstances, but the best rule of thumb is to keep away from
names that begin with _ and remember that the following patterns (egrep-type
meta-characters) are also reserved:

	<errno.h>	macros		E[0-9A-Z][_0-9a-zA-Z]*
	<ctype.h>	functions	(is|to)[a-z][_0-9a-zA-Z]*
	<locale.h>	macros		LC_[A-Z][_0-9a-zA-Z]*
	<math.h>	functions	"existing functions"[fl]
	<signal.h>	macros		(SIG|SIG_)[A-Z][_0-9a-zA-Z]*
	<stdlib.h>	functions	str[a-z][_0-9a-zA-Z]*
	<string.h>	functions	(str|mem|wcs)[a-z][_0-9a-zA-Z]*

Dave Prosser	...not an official X3J11 answer...
Technical Details
Message-ID: <875@cbnewsl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsl!dfp
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!att!cbnewsl!dfp
From: dfp@cbnewsl.ATT.COM (david.f.prosser)
Newsgroups: comp.std.c
Subject: Re: Reserved names in ANSI C
Message-ID: <875@cbnewsl.ATT.COM>
Date: 21 Jun 89 13:34:03 GMT
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk> <13680@haddock.ima.isc.com> <1598@cbnewsh.ATT.COM>
Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser)
Organization: AT&T Bell Laboratories
Lines: 23