ascii string comparison [Re: use C locale for LC_CTYPE]

"corvid" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <20111023055530.GB15295@local>
Here's an idea of what we'd get:

http://www.dillo.org/test/ascii_strcasecmp.diff

- The naming is clear but kind of ugly.
- I haven't added explanatory comments yet.
- For the moment, it just #defines dStr(n)casecmp to the
  ASCII version because there are a bunch of them, but I'd
  go through and change the calls.

Thoughts?

Skimming through the diff now, I'm noticing the cases like
   if (dASCIItolower(attrbuf[0]) == 'j')
and thinking maybe
   if (attrbuf[0] == 'j' || attrbuf[0] == 'J')
would be better, but then this issue is probably too tiny to waste
precious seconds of my life in noticing.
(Whereas continuing to use tolower() because we know that 'j'
is safe would be bad practice, in my opinion.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.