Path: utzoo!attcan!uunet!mcvax!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.bugs.4bsd Subject: look -d ignores white space (with fix) Message-ID: <97@titania.warwick.ac.uk> Date: 26 Jan 89 09:54:32 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 35 Look's -d flag disagrees with both sort's and the manual on the treatment of white space, which makes it error-prone when searching the output from sort. The manual says it ignores everything except letters, digits, space and tab, in fact it ignores space and tab too. Fix: RCS file: look.c,v retrieving revision 1.1 diff -c -r1.1 look.c *** /tmp/,RCSt1011460 Thu Jan 26 09:52:14 1989 --- look.c Tue Jan 24 21:45:14 1989 *************** *** 152,158 **** break; } if(dict) { ! if(!isalnum(c)) continue; } if(fold) { --- 152,158 ---- break; } if(dict) { ! if(!isalnum(c) && !isspace(c)) continue; } if(fold) { Rob -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England