iscntrl()

Dick Dunn rcd at opus.UUCP
Thu Jan 17 15:16:10 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 }.
> ...
> (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 remember complaining about the broken iscntrl() in 4.[12] some time ago;
it may have been in unix-wizards.  The response to "why did they do this?"
was mostly stunning silence.  We fixed our version (i.e., put it back to
the way the manual documents it, the way V7 and successors have it, and the
way ASCII defines control character).  There's no reason for a big stink--
but let's get it fixed before this stupidity becomes institutionalized.

> 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!)

Doug will be glad (?!) to know that one exception to my earlier complaints
came from a rabid Berkeleyphile who claimed that he had a 4.2 version that
"works just fine" but didn't bother to explain.  I'm sure that some 4.2BSD
fans know that LF is a control character!
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
   ...A friend of the devil is a friend of mine.



More information about the Comp.lang.c mailing list