Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (NULL == 0) ?



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