On Tue, 27 Jul 1999, Nickolay N. Dudorov wrote:

>       After making it on the CURRENT system I can only
> see:
> 
>       grep: filename: Undefined error: 0
> 
> for every filename.

Every file?

> 
>       This caused by very "unusual" return values for
> 'grep_open' (and other '..._open') function which is declared
> as 'int' (and return int result) and compared with NULL ;-(
> 
>       I prefer not to include the patch for this because
> I am uncompatible with such trics as:
> 
>       return ((f = fopen(path, mode)) != NULL) - 1;

This was done this way because the gzopen and fopen both return pointers
of different types.  Maybe the best thing would be to have grep_open()
return a void pointer since procfile() doesn't keep track of what files
are open and not.  This is ugly and not very reusable, but then again how
many programs need transparent access to both gzip'd and plaintext files?

Jamie



To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to