Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.lang.c Subject: iscntrl() (more history) Message-ID: <1029@opus.UUCP> Date: Thu, 17-Jan-85 02:16:37 EST Article-I.D.: opus.1029 Posted: Thu Jan 17 02:16:37 1985 Date-Received: Sat, 19-Jan-85 01:40:38 EST References: <1161@ut-ngp.UUCP> <6932@brl-tgr.ARPA> <6274@boring.UUCP> Organization: NBI,Inc, Boulder CO Lines: 20 > >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.