Thread (9 messages) 9 messages, 5 authors, 2016-06-15

Re: Usage of isspace and friends

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:08

Linus Torvalds wrote:
Yeah, and I agree, that was a mistake. It could have been fixed by making 
EOF be MIN_INT (or any other value outside the range of either "unsigned 
char" or "signed char" - preferably still negative), but there are 
probably programs that depend on it being -1. 

The stupid thing I just posted doesn't care. It happens to return 0 for 
EOF for all cases, but that's a side effect of (a) not doing locales (so 
255 is never printable or alpha) and (b) not even implementing iscntrl().
Given that for isprint() et al are useless for non-ASCII UTF-8 anyway, 
might as well (they are not defined to be able to take wide character 
values.)

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help