Date: Sat, 3 Nov 2001 14:43:32 -0500 From: Joe Abley <jabley@automagic.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: Peter Pentchev <roam@ringlet.net>, arch@freebsd.org Subject: Re: POSIX character class support for 1Tawk Message-ID: <20011103144331.S25226@buffoon.automagic.org> In-Reply-To: <xzppu6zesgb.fsf@flood.ping.uio.no> References: <xzpu1wca91d.fsf@flood.ping.uio.no> <20011102233831.L25226@buffoon.automagic.org> <xzphesca0xv.fsf@flood.ping.uio.no> <20011103012226.Q25226@buffoon.automagic.org> <xzpvggse5j4.fsf@flood.ping.uio.no> <20011103145608.B76275@straylight.oblivion.bg> <xzppu6zesgb.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 03, 2001 at 05:21:08PM +0100, Dag-Erling Smorgrav wrote: > Peter Pentchev <roam@ringlet.net> writes: > > On Sat, Nov 03, 2001 at 07:23:59AM +0100, Dag-Erling Smorgrav wrote: > > > Joe Abley <jabley@automagic.org> writes: > > > > Our isalpha() and friends are locale-sensitive, I think. > > > Only if the caller has previously called setlocale(). > > So what's the problem in calling setlocale(LC_ALL, "") > > early in main() or something, as so many other utilities in > > our base system already do? > > You still have to totally rewrite the character class matching code, > instead of simply extending it like I've done. See my earlier > comments about enumerating the members of a character or equivalence > class. Rather than coding the character classes statically, as you have done, is not it possible to extract the character set for each posix class by expanding corresponding character ranges from _CurrentRuneLocale? This smells unportable (is there a portable interface to that structure?) Hard-coding the strings corresponding to the most common locales in bawk seems sub-optimal, considering that the same information exists elsewhere. The hard-coded strings are guaranteed to be wrong for some locale at some point in the future, if not now. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011103144331.S25226>