summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-12-22 14:01:44 -0800
committerJames Peach <jpeach@samba.org>2007-12-22 14:01:44 -0800
commitbf2269a04e5af056037c392fb7f29014b62d1bb2 (patch)
tree38a2c68c2835bb65725003dd479a3a6fdbee1a51 /source3/lib/util_str.c
parent1176e04c76e28d9ee9ab355c5e9edcd1b627ac03 (diff)
parenta000fa4ee5491ae32c60881b28b3536e88e82e27 (diff)
downloadsamba-bf2269a04e5af056037c392fb7f29014b62d1bb2.tar.gz
samba-bf2269a04e5af056037c392fb7f29014b62d1bb2.tar.bz2
samba-bf2269a04e5af056037c392fb7f29014b62d1bb2.zip
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 30cb2d215f1a4a440d5ecaab3f898daa714eee2b)
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r--source3/lib/util_str.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index ee76e33de8..7e21fe1195 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -137,83 +137,6 @@ bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
}
/**
-This is like next_token but is not re-entrant and "remembers" the first
-parameter so you can pass NULL. This is useful for user interface code
-but beware the fact that it is not re-entrant!
-**/
-
-static const char *last_ptr=NULL;
-
-bool next_token_nr_talloc(TALLOC_CTX *ctx,
- const char **ptr,
- char **pp_buff,
- const char *sep)
-{
- bool ret;
- if (!ptr) {
- ptr = &last_ptr;
- }
-
- ret = next_token_talloc(ctx, ptr, pp_buff, sep);
- last_ptr = *ptr;
- return ret;
-}
-
-void set_first_token(char *ptr)
-{
- last_ptr = ptr;
-}
-
-/**
- Convert list of tokens to array; dependent on above routine.
- Uses last_ptr from above - bit of a hack.
-**/
-
-char **toktocliplist(int *ctok, const char *sep)
-{
- char *s=(char *)last_ptr;
- int ictok=0;
- char **ret, **iret;
-
- if (!sep)
- sep = " \t\n\r";
-
- while(*s && strchr_m(sep,*s))
- s++;
-
- /* nothing left? */
- if (!*s)
- return(NULL);
-
- do {
- ictok++;
- while(*s && (!strchr_m(sep,*s)))
- s++;
- while(*s && strchr_m(sep,*s))
- *s++=0;
- } while(*s);
-
- *ctok=ictok;
- s=(char *)last_ptr;
-
- if (!(ret=iret=SMB_MALLOC_ARRAY(char *,ictok+1)))
- return NULL;
-
- while(ictok--) {
- *iret++=s;
- if (ictok > 0) {
- while(*s++)
- ;
- while(!*s)
- s++;
- }
- }
-
- ret[*ctok] = NULL;
- return ret;
-}
-
-/**
* Case insensitive string compararison.
*
* iconv does not directly give us a way to compare strings in