This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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
Attachment:
isblank.patch
Description: isblank.patch
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |