Sujet : Re: encapsulating directory operations
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : comp.lang.cDate : 23. May 2025, 17:50:49
Autres entêtes
Organisation : Fix this later
Message-ID : <100q919$5t6u$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla Thunderbird
On 23/05/2025 16:09, Richard Harnden wrote:
On 22/05/2025 23:32, Keith Thompson wrote:
"Paul Edwards" <mutazilah@gmail.com> writes:
[...]
>
In one of your library's headers:
>
extern const char ESCAPE;
>
In the corresponding *.c file:
>
const char ESCAPE = ('z' - 'a' == 25 ? '\x1b' : '\x27');
>
Change the name if you prefer.
Wouldn't that be a reserved identifier?
7.26.3 (in 9899:1999) reads: 'Macros that begin with E and a digit or E and an uppercase letter may be added to the
declarations in the <errno.h> header.'
I can find no reference to such identifiers being explicitly reserved (did I miss something?), but the above at least hints at a potential clash between declaring ESCAPE and including the <errno.h> header.
-- Richard HeathfieldEmail: rjh at cpax dot org dot uk"Usenet is a strange place" - dmr 29 July 1999Sig line 4 vacant - apply within