This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: problematic document for isascii(3)
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Thu, 23 May 2013 16:46:59 +0200
- Subject: Re: problematic document for isascii(3)
- References: <CADk2T0O2A8Zd1DQdMdHYFChrDNcKkbRouZ47hTJR_KKs6pfvUA at mail dot gmail dot com> <519E26D3 dot 4020101 at redhat dot com>
- Reply-to: newlib at sourceware dot org
On May 23 08:25, Eric Blake wrote:
> On 05/23/2013 07:21 AM, ntysdd wrote:
> > Hi,
> > I found something buggy in the document.
> > The doc says "`isascii' is ANSI C", but it isn't.
> > It is a BSD extension.
>
> Actually, it is also POSIX, but you are correct that it is not C.
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/isascii.html
>
> >
> > Also the doc for isdigit says
> > "It is defined only when `isascii'(C) is true or C is EOF."
>
> This is a lie; isascii(128) returns false, but isdigit(128) is well=defined.
>
> >
> > But isdigit is ANSI C so it should not rely on isascii.
> > And after reading the ansi draft, I think isdigit is defined
> > for anything representable as an unsigned char (plus EOF).
>
> Correct, that is also the POSIX wording:
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/isdigit.html
I fixed that in CVS.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat