unsigned char. On platforms were char is signed, passing plain char won't
cut it. Make sure we case chars to unsigned char before passing them to
tolower().
git-svn-id: svn://svn.tartarus.org/sgt/charset@8404
cda61777-01e9-0310-a592-
d414129be87e
p = name;
q = emacsencs[i].name;
while (*p || *q) {
- if (tolower(*p) != tolower(*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}
p = name;
q = localencs[i].name;
while (*p || *q) {
- if (tolower(*p) != tolower(*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}
p = name;
q = mimeencs[i].name;
while (*p || *q) {
- if (tolower(*p) != tolower(*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}
p = name;
q = xencs[i].name;
while (*p || *q) {
- if (tolower(*p) != tolower(*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}