This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
problematic document for isascii(3)
- From: ntysdd <ntysdd at gmail dot com>
- To: newlib at sourceware dot org
- Date: Thu, 23 May 2013 21:21:15 +0800
- Subject: problematic document for isascii(3)
Hi,
I found something buggy in the document.
The doc says "`isascii' is ANSI C", but it isn't.
It is a BSD extension.
Also the doc for isdigit says
"It is defined only when `isascii'(C) is true or C is EOF."
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).
By the way, the doc says isdigit is a macro using a table.
I don't think it need be implemented in this way because
something like '0' <= C && C<='9' is good enough.