summaryrefslogtreecommitdiff
path: root/source4/client/clitar.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-24 01:32:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:16 -0500
commit694ac65faa13cc016f54330b656e64225aa40aab (patch)
tree854ad9d4f278ceb67916d68b2843245a1d231097 /source4/client/clitar.c
parentaf057bdf84d91fe387e7920a6b753142e82d7682 (diff)
downloadsamba-694ac65faa13cc016f54330b656e64225aa40aab.tar.gz
samba-694ac65faa13cc016f54330b656e64225aa40aab.tar.bz2
samba-694ac65faa13cc016f54330b656e64225aa40aab.zip
r2003: got rid of next_token_nr(), which involved some horrible globals
and nasy pointer tricks. this involved fixing some of the internals of smbclient (This used to be commit 126fec6169f9412932c82e7675840476132bce87)
Diffstat (limited to 'source4/client/clitar.c')
-rw-r--r--source4/client/clitar.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index 1fa752d977..9ce9f27599 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -1272,12 +1272,12 @@ static void do_tarput(void)
/****************************************************************************
Blocksize command
***************************************************************************/
-int cmd_block(void)
+int cmd_block(const char **cmd_ptr)
{
fstring buf;
int block;
- if (!next_token_nr(NULL,buf,NULL,sizeof(buf)))
+ if (!next_token(cmd_ptr,buf,NULL,sizeof(buf)))
{
DEBUG(0, ("blocksize <n>\n"));
return 1;
@@ -1299,11 +1299,11 @@ int cmd_block(void)
/****************************************************************************
command to set incremental / reset mode
***************************************************************************/
-int cmd_tarmode(void)
+int cmd_tarmode(const char **cmd_ptr)
{
fstring buf;
- while (next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ while (next_token(cmd_ptr,buf,NULL,sizeof(buf))) {
if (strequal(buf, "full"))
tar_inc=False;
else if (strequal(buf, "inc"))
@@ -1340,7 +1340,7 @@ int cmd_tarmode(void)
/****************************************************************************
Feeble attrib command
***************************************************************************/
-int cmd_setmode(void)
+int cmd_setmode(const char **cmd_ptr)
{
char *q;
fstring buf;
@@ -1350,7 +1350,7 @@ int cmd_setmode(void)
attra[0] = attra[1] = 0;
- if (!next_token_nr(NULL,buf,NULL,sizeof(buf)))
+ if (!next_token(cmd_ptr,buf,NULL,sizeof(buf)))
{
DEBUG(0, ("setmode <filename> <[+|-]rsha>\n"));
return 1;
@@ -1359,7 +1359,7 @@ int cmd_setmode(void)
safe_strcpy(fname, cur_dir, sizeof(pstring));
safe_strcat(fname, buf, sizeof(pstring));
- while (next_token_nr(NULL,buf,NULL,sizeof(buf))) {
+ while (next_token(cmd_ptr,buf,NULL,sizeof(buf))) {
q=buf;
while(*q)
@@ -1397,19 +1397,19 @@ int cmd_setmode(void)
/****************************************************************************
Principal command for creating / extracting
***************************************************************************/
-int cmd_tar(void)
+int cmd_tar(const char **cmd_ptr)
{
fstring buf;
char **argl;
int argcl;
- if (!next_token_nr(NULL,buf,NULL,sizeof(buf)))
+ if (!next_token(cmd_ptr,buf,NULL,sizeof(buf)))
{
DEBUG(0,("tar <c|x>[IXbgan] <filename>\n"));
return 1;
}
- argl=toktocliplist(&argcl, NULL);
+ argl=toktocliplist(*cmd_ptr, &argcl, NULL);
if (!tar_parseargs(argcl, argl, buf, 0))
return 1;