Re: Usage of isspace and friends
From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:08
From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:08
Linus Torvalds wrote:
So Morten is right - if you have a "char *", it should not be dereferenced and used directly, although I think glibc does the right thing (and, in fact, I can't understand why the standards haven't been updated to do the right thing: it's _not_ that hard. In fact, it should be trivial apart from the special case of "255" that looks undistinguishable from EOF in signed char representation).
Because of the special case of 255 which looks indistinguishable from EOF, therefore making it required? The original mistake, of course, was allowing EOF to be passed to the various isxxx() macros. -hpa