iscntrl() (more history)

Dick Dunn rcd at opus.UUCP
Thu Jan 17 17:16:37 AEST 1985


> >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!)
> 
> This was already in the original v7 ctype.h...

NO, the mistake was not in the original v7 ctype.h (or, more precisely,
ctype_.c).  I was made painfully aware of the fact by a program which
broke when I moved from V7 to 4.1.

> When one first checks for 'isspace' and only then for 'iscntrl',
> everything goes well...

And if one checks iscntrl but not isspace, one is out of luck.  Pray tell,
what do I do if I want to know if variable `c' is a control character (by
standard definition of that term)?  Are you really suggesting that
	(iscntrl(c) || (isspace(c) && (c!=' '))
is reasonable?!
-- 
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