Ctype.h

rcd at opus.UUCP rcd at opus.UUCP
Sat Mar 17 14:16:34 AEST 1984


<>
> Why does ctype have 0 as the first element, and all the ctype
> functions add 1 to get the proper index?
(I believe) because the EOF value returned by getc/getchar (stdio) looks
like -1 when used as an index to the table.  Thus the EOF value is not a
member of any of the character classes.
-- 
{hao,ucbvax,allegra}!nbires!rcd



More information about the Comp.unix.wizards mailing list