diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-11-29 04:58:29 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-11-29 04:58:29 +0000 |
commit | 8bd89c72a37407dbc4bcbe15b0bd25cd7a12ccf3 (patch) | |
tree | b948a346a48545c0b707c75f34352ee7635b39a9 | |
parent | f6b962fba37a1ac105301d699708e541ce34d3b4 (diff) | |
download | samba-8bd89c72a37407dbc4bcbe15b0bd25cd7a12ccf3.tar.gz samba-8bd89c72a37407dbc4bcbe15b0bd25cd7a12ccf3.tar.bz2 samba-8bd89c72a37407dbc4bcbe15b0bd25cd7a12ccf3.zip |
fixed lame char tables on big endian machines
(This used to be commit 568425709d11b2eed86643d18973542d0504d5ca)
-rw-r--r-- | source3/lib/util_unistr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index d9bd4a4c06..5d4697e441 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -52,22 +52,22 @@ void load_case_tables(void) if (!upcase_table) { DEBUG(1,("creating lame upcase table\n")); upcase_table = malloc(0x20000); - for (i=0;i<256;i++) upcase_table[i] = islower(i)?toupper(i):i; - for (;i<0x10000;i++) upcase_table[i] = i; + for (i=0;i<256;i++) upcase_table[i] = UCS2_CHAR(islower(i)?toupper(i):i); + for (;i<0x10000;i++) upcase_table[i] = UCS2_CHAR(i); } if (!lowcase_table) { DEBUG(1,("creating lame lowcase table\n")); lowcase_table = malloc(0x20000); - for (i=0;i<256;i++) lowcase_table[i] = isupper(i)?tolower(i):i; - for (;i<0x10000;i++) lowcase_table[i] = i; + for (i=0;i<256;i++) lowcase_table[i] = UCS2_CHAR(isupper(i)?tolower(i):i); + for (;i<0x10000;i++) lowcase_table[i] = UCS2_CHAR(i); } if (!valid_table) { const char *allowed = "!#$%&'()_-@^`~"; DEBUG(1,("creating lame valid table\n")); valid_table = malloc(0x10000); - for (i=0;i<256;i++) valid_table[i] = isalnum(i) || strchr(allowed,i); + for (i=0;i<256;i++) valid_table[i] = UCS2_CHAR(isalnum(i) || strchr(allowed,i)); for (;i<0x10000;i++) valid_table[i] = 0; } } |