Roff in C and iscntrl()
Doug Gwyn <gwyn>
gwyn at brl-tgr.ARPA
Thu Jan 3 18:10:34 AEST 1985
> > iscntrl( c ) should return non-zero for c in
> > { 0, 1, ..., 036, 037, 0177 } and zero for c in
> > { 040, 041, ..., 0175, 0176 }.
>
> If this is indeed correct, then the Portable C Compiler provided with
> 4.2bsd is guilty of a serious offence.
(Again, this is a matter of the C library, not of the compiler!)
I confirmed that the 4.2BSD iscntrl() ctype macro is broken in the way
previously described. UNIX System V iscntrl() performs as I described
and as, apparently, the DeSmet C88 and CI-C86 C systems do.
I wonder how ANYone could have decided that e.g. LF is NOT a control
character? (I'm sure the 4.2BSD fans will think that makes sense!)
More information about the Comp.lang.c
mailing list