isblank patch
Howland Craig D (Craig)
howland@LGSInnovations.com
Wed Oct 15 18:41:00 GMT 2008
A couple of minor touchups for the isblank() function. ctype.h has it
listed as being non-ANSI, but it is. Additionally, isblank.c claimed
that it was a macro yet ctype.h does not have a macro for it. The
attached patch moves the prototype in ctype.h so that it is there for
ANSI
and makes appropriate cleanups to the comments in isblank.c. The patch
file also includes a ChangeLog entry.
(I decided not to create an isblank macro because it would have been
messy to make a good one. There are some to be found that do this:
#define isblank(c) ((c) == ' ' || (c) == '\t')
This form has the problem of evaluating the argument twice, which is
undesirable. I did not use the method presently in ctype.h for toupper
and tolower because they are only defined for GCC and would not
always be applicable, making a comment about it being a macro in the
man page subject to error.)
Craig Howland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isblank.patch
Type: application/octet-stream
Size: 2363 bytes
Desc: isblank.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20081015/920fd12f/attachment.obj>
More information about the Newlib
mailing list