CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo]

Andrey Chernov ache at
Tue Jun 24 21:30:22 UTC 2008

On Wed, Jun 25, 2008 at 01:04:20AM +0400, Andrey Chernov wrote:
> >         if ((s = mbstowcs(NULL, f->base, 0)) == -1)
> >                 return (0);
> The same here. Check EILSEQ and return 1

BTW, do you realyze that this code malloc()s _whole_file_ into memory 
(which not fits for very big files)?
Non-localized old code use mmap, so don't actually malloc() it.
Doe to that perhaps whole mmfile.c should be not used and removed.


More information about the freebsd-hackers mailing list