diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-11-22 07:09:12 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-11-22 07:09:12 +0000 |
commit | bac6b0daa288e879330e3d585582122bb93a1ffb (patch) | |
tree | 2b2a47eb0cd1136956bd6977cc7e36ce62bf25f1 /source/lib/kanji.c | |
parent | 8e8d239d9e112bf1eb32f4ec1657ff505a34d934 (diff) | |
download | samba-bac6b0daa288e879330e3d585582122bb93a1ffb.tar.gz samba-bac6b0daa288e879330e3d585582122bb93a1ffb.tar.xz samba-bac6b0daa288e879330e3d585582122bb93a1ffb.zip |
added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.
While I was doing this I found a couple of very nasty bugs in the
parm_table code. Someone had added a handle_character_set() function
that treated the char** pointer for a P_STRING as an integer! This
would have caused memory corruption for anyone using the "character
set" option. The loadparm code is delicate - please be careful about
using it's more esoteric features!
I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
Diffstat (limited to 'source/lib/kanji.c')
-rw-r--r-- | source/lib/kanji.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/lib/kanji.c b/source/lib/kanji.c index 5d7de87248d..75d1affb200 100644 --- a/source/lib/kanji.c +++ b/source/lib/kanji.c @@ -27,13 +27,10 @@ #define _KANJI_C_ #include "includes.h" -/* coding system keep in */ -int coding_system = SJIS_CODE; - /* jis si/so sequence */ -char jis_kso = JIS_KSO; -char jis_ksi = JIS_KSI; -char hex_tag = HEXTAG; +static char jis_kso = JIS_KSO; +static char jis_ksi = JIS_KSI; +static char hex_tag = HEXTAG; /******************************************************************* SHIFT JIS functions @@ -774,9 +771,9 @@ static int setup_string_function(int codes) /* * Interpret coding system. */ -int interpret_coding_system(char *str, int def) +int interpret_coding_system(char *str) { - int codes = def; + int codes = UNKNOWN_CODE; if (strequal (str, "sjis")) { codes = SJIS_CODE; |