summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c17
-rw-r--r--source3/lib/util_str.c6
-rw-r--r--source3/lib/util_unistr.c12
3 files changed, 10 insertions, 25 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3f57048a00..527e1376d1 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -63,19 +63,6 @@ int chain_size = 0;
int trans_num = 0;
-/*
- case handling on filenames
-*/
-int case_default = CASE_LOWER;
-
-/* the following control case operations - they are put here so the
- client can link easily */
-BOOL case_sensitive;
-BOOL case_preserve;
-BOOL use_mangled_map = False;
-BOOL short_case_preserve;
-BOOL case_mangle;
-
static enum remote_arch_types ra_type = RA_UNKNOWN;
pstring user_socket_options=DEFAULT_SOCKET_OPTIONS;
@@ -609,7 +596,7 @@ void unix_clean_name(char *s)
Make a dir struct.
****************************************************************************/
-void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date)
+void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date, BOOL case_sensitive)
{
char *p;
pstring mask2;
@@ -1500,7 +1487,7 @@ const char *readdirname(DIR *p)
of a path matches a (possibly wildcarded) entry in a namelist.
********************************************************************/
-BOOL is_in_path(const char *name, name_compare_entry *namelist)
+BOOL is_in_path(const char *name, name_compare_entry *namelist, BOOL case_sensitive)
{
pstring last_component;
char *p;
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 600c830ace..65ef306ed1 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -334,9 +334,8 @@ char *strupper_static(const char *s)
Convert a string to "normal" form.
**/
-void strnorm(char *s)
+void strnorm(char *s, int case_default)
{
- extern int case_default;
if (case_default == CASE_UPPER)
strupper_m(s);
else
@@ -347,9 +346,8 @@ void strnorm(char *s)
Check if a string is in "normal" case.
**/
-BOOL strisnormal(const char *s)
+BOOL strisnormal(const char *s, int case_default)
{
- extern int case_default;
if (case_default == CASE_UPPER)
return(!strhaslower(s));
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 005f10a4c0..bfb5288826 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -506,13 +506,13 @@ BOOL strupper_w(smb_ucs2_t *s)
/*******************************************************************
convert a string to "normal" form
********************************************************************/
-void strnorm_w(smb_ucs2_t *s)
+
+void strnorm_w(smb_ucs2_t *s, int case_default)
{
- extern int case_default;
- if (case_default == CASE_UPPER)
- strupper_w(s);
- else
- strlower_w(s);
+ if (case_default == CASE_UPPER)
+ strupper_w(s);
+ else
+ strlower_w(s);
}
int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b)