Newsgroups: comp.std.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Naming Message-ID: <1990Feb21.190612.13368@utzoo.uucp> Organization: U of Toronto Zoology References: Date: Wed, 21 Feb 90 19:06:12 GMT In article mcdaniel@amara.uucp (Tim McDaniel) writes: >What names are reserved in ANSI C? ... Unfortunately, there are a whole pile of them, and they don't follow any particularly regular pattern. Everything in the ANSI C library is reserved, modulo some small escape clauses for things like macros if you don't include the relevant header file(s). And there are a bunch of reservations for future expansion, some of which are macros and hence applicable only if relevant header files are included, some of which are external names and hence are reserved regardless. For example, not only are all the function names in reserved, so are those names suffixed by "f" or "l", for future provision of float and long-double variants. Over and above the existing C-library names, and the extension reservation, the list is: _[_A-Z].* everywhere for all purposes _[a-zA-Z0-9_].* everywhere as file-scope identifiers and tags E[0-9A-Z].* in (is|to)[a-z].* as external names, and in LC_[A-Z].* in SIG_?[A-Z].* in str[a-z].* as external names, and in or mem[a-z].* as external names, and in wcs[a-z].* as external names, and in >... How about in the current UNIX >standardization effort? POSIX basically goes by the ANSI rules unless you define _POSIX_SOURCE before including headers, in which case more standard names appear. Also there are some POSIX-specific headers. In particular, can define any .*_t name. -- "The N in NFS stands for Not, | Henry Spencer at U of Toronto Zoology or Need, or perhaps Nightmare"| uunet!attcan!utzoo!henry henry@zoo.toronto.edu