summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-26 01:09:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:15 -0500
commit17cb5517f8c9d17ad00ce9008e82dcbda45308f2 (patch)
tree4f45fda49e81b040198bc20935651d9c666e54f3 /source4
parent4a1d53a07a5bb1b5a5c73eceb173225924a71ef5 (diff)
downloadsamba-17cb5517f8c9d17ad00ce9008e82dcbda45308f2.tar.gz
samba-17cb5517f8c9d17ad00ce9008e82dcbda45308f2.tar.bz2
samba-17cb5517f8c9d17ad00ce9008e82dcbda45308f2.zip
r2639: we doon't need the valid_table code, so get rid of it
(This used to be commit 480636ebbca102172621609496bdab682d4bda8a)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util_unistr.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index 2d4b2e8fa8..59386ec31d 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -25,7 +25,6 @@
at startup either via mmap() or read() from the lib directory */
static smb_ucs2_t *upcase_table;
static smb_ucs2_t *lowcase_table;
-static uint8_t *valid_table;
/*******************************************************************
@@ -103,61 +102,6 @@ static int check_dos_char(smb_ucs2_t c)
return (c == c2);
}
-/**
- * Load the valid character map table from <tt>valid.dat</tt> or
- * create from the configured codepage.
- *
- * This function is called whenever the configuration is reloaded.
- * However, the valid character table is not changed if it's loaded
- * from a file, because we can't unmap files.
- **/
-void init_valid_table(void)
-{
- static int mapped_file;
- int i;
- const char *allowed = ".!#$%&'()_-@^`~";
- uint8_t *valid_file;
- TALLOC_CTX *mem_ctx;
-
- if (mapped_file) {
- /* Can't unmap files, so stick with what we have */
- return;
- }
-
- mem_ctx = talloc_init("init_valid_table");
- if (!mem_ctx) {
- smb_panic("No memory for valid_table");
- }
- valid_file = map_file(lib_path(mem_ctx, "valid.dat"), 0x10000);
- talloc_destroy(mem_ctx);
- if (valid_file) {
- valid_table = valid_file;
- mapped_file = 1;
- return;
- }
-
- /* Otherwise, we're using a dynamically created valid_table.
- * It might need to be regenerated if the code page changed.
- * We know that we're not using a mapped file, so we can
- * free() the old one. */
- if (valid_table) free(valid_table);
-
- DEBUG(2,("creating default valid table\n"));
- valid_table = malloc(0x10000);
- if (!valid_table) {
- smb_panic("No memory for valid_table");
- }
- for (i=0;i<128;i++)
- valid_table[i] = isalnum(i) || strchr(allowed,i);
-
- for (;i<0x10000;i++) {
- smb_ucs2_t c;
- SSVAL(&c, 0, i);
- valid_table[i] = check_dos_char(c);
- }
-}
-
-
/*******************************************************************
Convert a wchar to upper case.
********************************************************************/