Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Optimize access to isXYZ and toXYZ tables
The functions to get the pointers can now depend on the TLS variable be initialized.
- Loading branch information
Ulrich Drepper
committed
Oct 15, 2011
1 parent
2d1f3a4
commit fd5bdc0
Showing
10 changed files
with
135 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#include <ctype.h> | ||
#include <locale.h> | ||
#include <stdio.h> | ||
#include <wctype.h> | ||
|
||
|
||
static int | ||
do_test (void) | ||
{ | ||
const char *loc = "de_DE.ISO-8859-1"; | ||
if (setlocale (LC_ALL, loc) == NULL) | ||
{ | ||
printf ("cannot set %s locale\n", loc); | ||
return 1; | ||
} | ||
printf ("selected locale %s\n", loc); | ||
|
||
wint_t win = 0xe4; | ||
wint_t wex = 0xc4; | ||
wint_t wch = towupper (win); | ||
if (wch != wex) | ||
{ | ||
printf ("towupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
wch = toupper (win); | ||
if (wch != wex) | ||
{ | ||
printf ("toupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
|
||
win = 0x69; | ||
wex = 0x49; | ||
wch = towupper (win); | ||
if (wch != wex) | ||
{ | ||
printf ("towupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
wch = toupper (win); | ||
if (wch != wex) | ||
{ | ||
printf ("toupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
|
||
loc = "tr_TR.ISO-8859-9"; | ||
if (setlocale (LC_ALL, loc) == NULL) | ||
{ | ||
printf ("cannot set %s locale\n", loc); | ||
return 1; | ||
} | ||
printf ("selected locale %s\n", loc); | ||
|
||
win = 0x69; | ||
wex = 0x130; | ||
wch = towupper (win); | ||
if (wch != wex) | ||
{ | ||
printf ("towupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
wch = toupper (win); | ||
wex = 0xdd; | ||
if (wch != wex) | ||
{ | ||
printf ("toupper(%x) = %x, expected %x\n", win, wch, wex); | ||
return 1; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
#define TEST_FUNCTION do_test () | ||
#include "../test-skeleton.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters