summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-07-18 20:21:32 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-07-18 20:21:32 +0000
commit612111c7a1a048d19e24b5e2e4d426247d320d1e (patch)
tree1a24304f1f3b3a171fbe6deab8711d63f3a6b965 /source3/lib
parent8b904f4ecc7b6bd6558d40fda4184112bbb10366 (diff)
downloadsamba-612111c7a1a048d19e24b5e2e4d426247d320d1e.tar.gz
samba-612111c7a1a048d19e24b5e2e4d426247d320d1e.tar.bz2
samba-612111c7a1a048d19e24b5e2e4d426247d320d1e.zip
charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map twice. charset.h: Changes to support charset changes. client.c: Changes to support charset changes. loadparm.c: follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch> nmbd.c: Changes to support charset changes. nmblookup.c:Changes to support charset changes. proto.h: Changes to support charset changes. reply.c: Don't call security=server with no user/no password guest. Fix from Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> server.c: follow symlinks code from David Clerc <David.Clerc@cui.unige.ch> smbpasswd.c:Changes to support charset changes. status.c: Changes to support charset changes. testparm.c: Changes to support charset changes. testprns.c: Changes to support charset changes. uid.c: Fixed log message with no \n. Jeremy (jallison@whistle.com) (This used to be commit 2a28a6e5e461aca7fe6c19cd01d287010056cffb)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/charset.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/lib/charset.c b/source3/lib/charset.c
index f066b9a472..b463344daa 100644
--- a/source3/lib/charset.c
+++ b/source3/lib/charset.c
@@ -198,10 +198,9 @@ static void add_dos_char(int lower, BOOL map_lower_to_upper,
/****************************************************************************
initialise the charset arrays
****************************************************************************/
-void charset_initialise(int client_codepage)
+void charset_initialise()
{
int i;
- unsigned char (*cp)[4];
#ifdef LC_ALL
/* include <locale.h> in includes.h if available for OS */
@@ -215,7 +214,7 @@ void charset_initialise(int client_codepage)
for (i=0;i<=127;i++) {
if (isalnum((char)i) || strchr("._^$~!#%&-{}()@'`",(char)i))
- add_dos_char(i,0,False,False);
+ add_dos_char(i,False,0,False);
}
for (i=0; i<=255; i++) {
@@ -224,9 +223,17 @@ void charset_initialise(int client_codepage)
if (isupper(c)) lower_char_map[i] = tolower(c);
if (islower(c)) upper_char_map[i] = toupper(c);
}
+}
- if(client_codepage != -1)
- DEBUG(6,("charset_initialise: client code page = %d\n", client_codepage));
+/****************************************************************************
+initialise the client codepage.
+****************************************************************************/
+void codepage_initialise(int client_codepage)
+{
+ int i;
+ unsigned char (*cp)[4] = NULL;
+
+ DEBUG(6,("codepage_initialise: client code page = %d\n", client_codepage));
/*
* Known client codepages - these can be added to.
@@ -239,16 +246,12 @@ void charset_initialise(int client_codepage)
case 437:
cp = cp_437;
break;
- case -1: /* pre-initialize call so that toupper/tolower work
- before smb.conf is read. */
- cp = NULL;
- break;
default:
- /* Default charset - currently 850 */
- DEBUG(6,("charset_initialise: Using default client codepage %d\n", 850));
+ /* Use default codepage - currently 850 */
+ DEBUG(6,("codepage_initialise: Using default client codepage %d\n",
+ 850));
cp = cp_850;
break;
-
}
if(cp)