svn commit: r204803 - head/usr.bin/uniq

Andrey Chernov ache at nagual.pp.ru
Mon Mar 8 20:29:24 UTC 2010


On Mon, Mar 08, 2010 at 02:51:23PM -0500, David Schultz wrote:
> You can actually just call getline() rather than reinventing the
> wheel.  

See just committed version. I use getline(3) (POSIX one).

> I've had a wide character version of getline() ready to
> commit for some time (I just need to find the time to do it), so
> you won't need to call mbstowcs() as a separate step.

It does not help, since wide version will fail on EILSEQ with sync lost,
as getwc() does. Initially I was thinking about ftell+fseek back, but not 
all files are seekable.

BTW, I plan to made similar changes to comm(1) too, it suffer from the 
same EILSEQ problem.

-- 
http://ache.pp.ru/


More information about the svn-src-all mailing list