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

Andrey Chernov ache at
Sun Jun 22 13:53:55 UTC 2008

On Sun, Jun 22, 2008 at 02:58:17PM +0200, Gabor Kovesdan wrote:
> Andrey Chernov escribi?:
> > On Wed, Jun 18, 2008 at 12:40:24PM +0200, Dag-Erling Sm??rgrav wrote:
> >   
> >> For grep, I believe it should simply be a matter of calling setlocale(),
> >> using wide strings, and using a multibyte regex engine (for appropriate
> >> values of "simply").
> >>     
> >
> > See my prev reply telling more details. Using wide strings is not so easy, 
> > f.e. all ctype BSD grep now uses should be converted to wctype, input 
> > conversion added, etc.
> >   
> I've started to work on doing this big change, the first step:

1) You can't convert just whole buffer after fread() since it can be 
ended in the middle of multibyte sequence on BUFSIZ edge. Look how GNU 
utils do it.

2) Better use iswspace and iswcntrl instead of iswctype.

3) util.c needs to be fixed in several places too.


More information about the freebsd-hackers mailing list