summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-06-21 09:10:42 +0000
committerAndrew Tridgell <tridge@samba.org>2001-06-21 09:10:42 +0000
commit91b8a8d1d21b810b6aca44ce647837669efd6dcf (patch)
tree2490cec37a9ae7f9f9ad9adabac033b41e26c07b /source3/include
parent4ff011d88ef5b79b92d2cea1abe32c93bc03f724 (diff)
downloadsamba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.tar.gz
samba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.tar.bz2
samba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.zip
next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means we can get bizarre behaviour i've fixed this by making next_token() reentrant and creating a next_token_nr() that is a small non-reentrant wrapper for those lumps of code (mostly smbclient) that have come to rely on the non-reentrant behaviour (This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 595973d411..2f016889d6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -628,8 +628,9 @@ int create_pipe_socket(char *dir, int dir_perms,
/* The following definitions come from lib/util_str.c */
-void set_first_token(char *ptr);
BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize);
+BOOL next_token_nr(char **ptr,char *buff,char *sep, size_t bufsize);
+void set_first_token(char *ptr);
char **toktocliplist(int *ctok, char *sep);
int StrCaseCmp(const char *s, const char *t);
int StrnCaseCmp(const char *s, const char *t, size_t n);
@@ -711,9 +712,6 @@ int isxdigit_w( smb_ucs2_t val);
int isspace_w( smb_ucs2_t val);
smb_ucs2_t toupper_w( smb_ucs2_t val );
smb_ucs2_t tolower_w( smb_ucs2_t val );
-void set_first_token_w(smb_ucs2_t *ptr);
-BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize);
-smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep);
int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t);
int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n);
BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);