summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/lib/kanji.c16
2 files changed, 16 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ca37799bd7..e6a0b1efd7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -756,9 +756,6 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize);
char *Strstr(char *s, char *p);
time_t Mktime(struct tm *t);
int InNetGr(char *group,char *host,char *user,char *dom);
-void *malloc_wrapped(int size,char *file,int line);
-void *realloc_wrapped(void *ptr,int size,char *file,int line);
-void free_wrapped(void *ptr,char *file,int line);
void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line);
/*The following definitions come from reply.c */
diff --git a/source3/lib/kanji.c b/source3/lib/kanji.c
index 75d1affb20..f6aace8411 100644
--- a/source3/lib/kanji.c
+++ b/source3/lib/kanji.c
@@ -41,6 +41,9 @@ static char hex_tag = HEXTAG;
********************************************************************/
char *sj_strtok(char *s1, char *s2)
{
+ if (lp_client_code_page() != KANJI_CODEPAGE) {
+ return strtok(s1, s2);
+ } else {
static char *s = NULL;
char *q;
if (!s1) {
@@ -72,6 +75,7 @@ char *sj_strtok(char *s1, char *s2)
return q;
}
return NULL;
+ }
}
/*******************************************************************
@@ -80,6 +84,9 @@ char *sj_strtok(char *s1, char *s2)
********************************************************************/
char *sj_strstr(char *s1, char *s2)
{
+ if (lp_client_code_page() != KANJI_CODEPAGE) {
+ return strstr(s1, s2);
+ } else {
int len = strlen ((char *) s2);
if (!*s2)
return (char *) s1;
@@ -95,6 +102,7 @@ char *sj_strstr(char *s1, char *s2)
}
}
return 0;
+ }
}
/*******************************************************************
@@ -103,6 +111,9 @@ char *sj_strstr(char *s1, char *s2)
********************************************************************/
char *sj_strchr (char *s, int c)
{
+ if (lp_client_code_page() != KANJI_CODEPAGE) {
+ return strchr(s, c);
+ } else {
for (; *s; ) {
if (*s == c)
return (char *) s;
@@ -113,6 +124,7 @@ char *sj_strchr (char *s, int c)
}
}
return 0;
+ }
}
/*******************************************************************
@@ -121,6 +133,9 @@ char *sj_strchr (char *s, int c)
********************************************************************/
char *sj_strrchr(char *s, int c)
{
+ if (lp_client_code_page() != KANJI_CODEPAGE) {
+ return strrchr(s, c);
+ } else {
char *q;
for (q = 0; *s; ) {
@@ -134,6 +149,7 @@ char *sj_strrchr(char *s, int c)
}
}
return q;
+ }
}
/*******************************************************************