From 971b640e0cb8bac510771d126454a8e4d2eff507 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 29 Jun 2007 17:27:59 +0000 Subject: r23660: Anybody know what check_dos_char() was used for? It wasn't called at all, so it's gone. With it 8k bss went away. (This used to be commit 7e9a4c39a5ce620f8eac74d0ae4dd80b96c81aca) --- source3/lib/util_unistr.c | 52 +---------------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) (limited to 'source3/lib/util_unistr.c') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index cf040a2dfc..0221d19dc1 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -35,14 +35,6 @@ static BOOL upcase_table_use_unmap; static BOOL lowcase_table_use_unmap; static BOOL valid_table_use_unmap; -/** - * This table says which Unicode characters are valid dos - * characters. - * - * Each value is just a single bit. - **/ -static uint8 doschar_table[8192]; /* 65536 characters / 8 bits/byte */ - /** * Destroy global objects allocated by load_case_tables() **/ @@ -150,21 +142,6 @@ void load_case_tables(void) #endif } -/* - see if a ucs2 character can be mapped correctly to a dos character - and mapped back to the same character in ucs2 -*/ - -int check_dos_char(smb_ucs2_t c) -{ - lazy_initialize_conv(); - - /* Find the right byte, and right bit within the byte; return - * 1 or 0 */ - return (doschar_table[(c & 0xffff) / 8] & (1 << (c & 7))) != 0; -} - - static int check_dos_char_slowly(smb_ucs2_t c) { char buf[10]; @@ -182,33 +159,6 @@ static int check_dos_char_slowly(smb_ucs2_t c) return (c == c2); } - -/** - * Fill out doschar table the hard way, by examining each character - **/ - -void init_doschar_table(void) -{ - int i, j, byteval; - - /* For each byte of packed table */ - - for (i = 0; i <= 0xffff; i += 8) { - byteval = 0; - for (j = 0; j <= 7; j++) { - smb_ucs2_t c; - - c = i + j; - - if (check_dos_char_slowly(c)) { - byteval |= 1 << j; - } - } - doschar_table[i/8] = byteval; - } -} - - /** * Load the valid character map table from valid.dat or * create from the configured codepage. @@ -257,7 +207,7 @@ void init_valid_table(void) for (;i<0x10000;i++) { smb_ucs2_t c; SSVAL(&c, 0, i); - valid_table[i] = check_dos_char(c); + valid_table[i] = check_dos_char_slowly(c); } } -- cgit