From 91b8a8d1d21b810b6aca44ce647837669efd6dcf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 Jun 2001 09:10:42 +0000 Subject: 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) --- source3/include/proto.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/include') 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); -- cgit