summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-04-23 11:38:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-04-23 11:38:35 +0000
commit075986b00d85fdcfe8674bd84f1c32828908475f (patch)
tree0649bb1ed123b6540167c5bf5f57cad13923dcbd
parentc95a50cce5b3dbe6eaca819f9477d6f7275762d6 (diff)
downloadsamba-075986b00d85fdcfe8674bd84f1c32828908475f.tar.gz
samba-075986b00d85fdcfe8674bd84f1c32828908475f.tar.xz
samba-075986b00d85fdcfe8674bd84f1c32828908475f.zip
Merge case handling table changes from 3.0 to HEAD.
(This used to be commit 263407e132dcb1f7fc85cded9842e60918f8ef4b)
-rw-r--r--source3/lib/util_unistr.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 812859000a9..08bb03986f1 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -40,9 +40,12 @@ static uint8 *valid_table;
static uint8 doschar_table[8192]; /* 65536 characters / 8 bits/byte */
-/*******************************************************************
-load the case handling tables
-********************************************************************/
+/**
+ * Load or generate the case handling tables.
+ *
+ * The case tables are defined in UCS2 and don't depend on any
+ * configured parameters, so they never need to be reloaded.
+ **/
void load_case_tables(void)
{
static int initialised;
@@ -91,14 +94,9 @@ void load_case_tables(void)
see if a ucs2 character can be mapped correctly to a dos character
and mapped back to the same character in ucs2
*/
-static int check_dos_char(smb_ucs2_t c)
+int check_dos_char(smb_ucs2_t c)
{
- static int initialized = False;
-
- if (!initialized) {
- initialized = True;
- init_doschar_table();
- }
+ lazy_initialize_conv();
/* Find the right byte, and right bit within the byte; return
* 1 or 0 */