Subject: Re: AW: Recursive grep (where is limfree defined?)
To: None <current-users@NetBSD.ORG>
From: Jeff Thieleke <thieleke@icaen.uiowa.edu>
List: current-users
Date: 02/01/1996 15:42:31
> > int isBinaryFile()
> >
> > /* look for non-printable chars */
> > for(i = 0; i < n; i++)
> > if (!isprint(buf[i]) && !isspace(buf[i]))
> > return(1);
>
> This is broken as long as "isprint" doesn't have proper NLS support.
> Even then it's arguable that you might print text files from other locales
> some times...
Yeah, I realized that, but you can argue the it is isprint() that is
really broken. Either way, most text files are based upon 7 bit
characters - especially source code file.
The whole matter might be moot, however. I have been trying to crash grep
(rgrep, without the -a argument) on large binary files, and I can't do it.
The largest binary file that I have on my system is a 30M gzipped dump
file, and grep happily searches through that without problems. In fact,
it searches through the whole directory tree containing 170M of similar
files.
Maybe I am just lucky, or maybe grep isn't as broken as people think.
Jeff Thieleke