git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Usage of isspace and friends

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Oct 13, 2005, 16:07 UTC
Message-ID
<434E8650.7060604@zytor.com>
In-Reply-To
<Pine.LNX.4.64.0510130847190.15297@g5.osdl.org>
Linus Torvalds wrote:
Show 10 quoted lines
> 
> 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
Previous: Linus TorvaldsNext: Linus Torvalds
Message 9 of 10 in “Usage of isspace and friends”
  1. Morten WelinderOct 12, 2005
  2. Junio C HamanoOct 13, 2005
  3. Antti-Juhani KaijanahoOct 13, 2005
  4. H. Peter AnvinOct 13, 2005
  5. Junio C HamanoOct 13, 2005
  6. Linus TorvaldsOct 13, 2005
  7. H. Peter AnvinOct 13, 2005
  8. Linus TorvaldsOct 13, 2005
  9. H. Peter AnvinOct 13, 2005
  10. Linus TorvaldsOct 13, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.