* don't try to check __isctype((char)255), as it will clash with
neutral/identity value at -1 (EOF) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38707 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6df16a01ed
commit
4a0b7d1bd0
@ -691,13 +691,16 @@ test_ctype(const char* locale, const unsigned short int classInfos[],
|
||||
int problemCount = 0;
|
||||
for (int i = -1; i < 256; ++i) {
|
||||
unsigned short classInfo = determineFullClassInfo(i);
|
||||
char iAsChar = (char)i;
|
||||
unsigned short classInfoFromChar = determineFullClassInfo(iAsChar);
|
||||
|
||||
if (classInfo != classInfoFromChar) {
|
||||
printf("\tPROBLEM: ctype((int)%d)=%x, but ctype((char)%d)=%x\n", i,
|
||||
classInfo, i, classInfoFromChar);
|
||||
problemCount++;
|
||||
if (i < 255) {
|
||||
char iAsChar = (char)i;
|
||||
unsigned short classInfoFromChar = determineFullClassInfo(iAsChar);
|
||||
|
||||
if (classInfo != classInfoFromChar) {
|
||||
printf("\tPROBLEM: ctype((int)%d)=%x, but ctype((char)%d)=%x\n",
|
||||
i, classInfo, i, classInfoFromChar);
|
||||
problemCount++;
|
||||
}
|
||||
}
|
||||
if (classInfo != classInfos[i + 1]) {
|
||||
printf("\tPROBLEM: ctype(%d) = %x (expected %x)\n", i, classInfo,
|
||||
|
Loading…
Reference in New Issue
Block a user