This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: [RFA] Update iswalpha, iswprint, iswpunct (was Re: Update wctype functions to Unicode 5.2?)
For the reasons that you state, I agree that your short method is the
way
to go for iswpunct().
Craig
-----Original Message-----
From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
On Behalf Of Corinna Vinschen
Sent: Wednesday, February 17, 2010 4:26 AM
To: newlib@sourceware.org
Subject: Re: [RFA] Update iswalpha, iswprint, iswpunct (was Re: Update
wctype functions to Unicode 5.2?)
...
> The easiest part of the patch is in iswpunct.c. Instead of
maintaining
> the big table in utf8punct.h, the entire code is now reduced to
>
> return (!iswalnum (c) && iswgraph (c));
>
> This is the definition of the iswpunct character class. As long as
the
> iswprint and iswalpha character tables are correct, the iswpunct
> function is by definition also correct. So, no need to keep the
tables
> around.
Btw., if you have mixed feelings about this change to iswpunct, I can
also provide a patch which implements it in the old terms of a the
big switch and the tables in utf8punct.h. It just takes another day.
However, I think it is more elegant to define it as above, because it's
one less point of failure and it saves space.
Corinna