Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (NULL == 0) ?
- X-seq: zsh-workers 1206
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zefram <A.Main@xxxxxxxxxxxxxxxxx>, hzoli@xxxxxxxxxx (Zoltan Hidvegi), zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: (NULL == 0) ?
- Date: Mon, 27 May 1996 21:54:10 -0700
- In-reply-to: Zefram <A.Main@xxxxxxxxxxxxxxxxx> "Re: (NULL == 0) ?" (May 27, 11:54pm)
- References: <26886.199605272254@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On May 27, 11:54pm, Zefram wrote:
} Subject: Re: (NULL == 0) ?
}
} >Bart wrote that ANSI C guarantees ASCII in the cases we need so that should
} >not cause any problems.
}
} C doesn't guarantee *any* use of ASCII. It does make some guarantees
} about the character set, but nothing involving actual ASCII.
Oops, you're right. ANSI only guarantees that character constants will
behave "as if" they were read by the stdio library. Sorry about that;
I should have remembered, for example, that perfectly good C compilers
on the Mac swap the integer values of '\r' and '\n' so that Mac text
files will appear to have '\n'-terminated lines.
Does zsh assume ASCII ordering of e.g. 'a' .. 'z' anywhere? Or only
that all of 'a' .. 'z' etc. are in the range 1 .. 255?
I tend to agree with RC that trying too hard to deal with all these
obscure cases will only cause more problems than it solves. If we
have to do something, perhaps a simple configuration test for ASCII
character ordering of the alphanumerics would be sufficient.
} (Basically, all the characters that C uses, plus the characters with
} escapes like '\a', must be in the character set and distinct [...])
It doesn't even guarantee that, actually, now that my memory has been
jogged. Trigraphs were invented because some characters like '[' and
']' aren't in some character sets (e.g. ISO 646).
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author