Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weirdness in comm(1)

At Sat, 28 Nov 2009 20:01:55 -0500, "Greg A. Woods" <> 
Subject: Re: Weirdness in comm(1)
> Note that FreeBSD's comm(1) already uses getline(3), but I still think
> using the _old_ fgetln(3) is better.

Oops, I mis-spoke.  FreeBSD's comm.c includes a private (but not
"static") getline() function.

It has however been converted to handle multi-byte characters and deal
properly with different locale settings, apparently fully conforming to
P1003.2-92.  Its internal getline() function calls getwc(), and it uses
realloc() to handle the longest possible lines, and it uses wcscoll(3)
to compare the strings.

There are probably several, or many other, tools that have already been
converted to deal properly with multi-byte characters in FreeBSD --
perhaps NetBSD should go on a borrowing spree.  To bad we're all not yet
using Git already!  :-)

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218 0099

Attachment: pgpbDXe2ikVB3.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index