version 1.23, 2005/04/18 21:02:50 |
version 1.24, 2005/04/19 00:38:39 |
|
|
int cvs_update_file(CVSFILE *, void *); |
int cvs_update_file(CVSFILE *, void *); |
int cvs_update_prune(CVSFILE *, void *); |
int cvs_update_prune(CVSFILE *, void *); |
int cvs_update_options(char *, int, char **, int *); |
int cvs_update_options(char *, int, char **, int *); |
|
int cvs_update_sendflags(struct cvsroot *); |
|
|
struct cvs_cmd_info cvs_update = { |
struct cvs_cmd_info cvs_update = { |
cvs_update_options, |
cvs_update_options, |
NULL, |
cvs_update_sendflags, |
cvs_update_file, |
cvs_update_file, |
NULL, NULL, |
NULL, NULL, |
CF_SORT | CF_RECURSE | CF_IGNORE | CF_KNOWN | CF_NOSYMS, |
CF_SORT | CF_RECURSE | CF_IGNORE | CF_KNOWN | CF_NOSYMS, |
|
|
CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2 | CVS_CMD_SENDDIR |
CVS_CMD_ALLOWSPEC | CVS_CMD_SENDARGS2 | CVS_CMD_SENDDIR |
}; |
}; |
|
|
|
static int Pflag, dflag, Aflag; |
|
|
int |
int |
cvs_update_options(char *opt, int argc, char **argv, int *arg) |
cvs_update_options(char *opt, int argc, char **argv, int *arg) |
{ |
{ |
int ch; |
int ch; |
|
|
|
Pflag = dflag = Aflag = 0; |
|
|
while ((ch = getopt(argc, argv, opt)) != -1) { |
while ((ch = getopt(argc, argv, opt)) != -1) { |
switch (ch) { |
switch (ch) { |
case 'A': |
case 'A': |
|
Aflag = 1; |
|
break; |
case 'C': |
case 'C': |
case 'D': |
case 'D': |
case 'd': |
case 'd': |
|
dflag = 1; |
|
break; |
case 'f': |
case 'f': |
break; |
break; |
case 'l': |
case 'l': |
cvs_update.file_flags &= ~CF_RECURSE; |
cvs_update.file_flags &= ~CF_RECURSE; |
break; |
break; |
case 'P': |
case 'P': |
|
Pflag = 1; |
|
break; |
case 'p': |
case 'p': |
case 'Q': |
case 'Q': |
case 'q': |
case 'q': |
|
|
return (0); |
return (0); |
} |
} |
|
|
|
int |
|
cvs_update_sendflags(struct cvsroot *root) |
|
{ |
|
if (Pflag && cvs_sendarg(root, "-P", 0) < 0) |
|
return (CVS_EX_PROTO); |
|
if (Aflag && cvs_sendarg(root, "-a", 0) < 0) |
|
return (CVS_EX_PROTO); |
|
if (dflag && cvs_sendarg(root, "-d", 0) < 0) |
|
return (CVS_EX_PROTO); |
|
return (0); |
|
} |
|
|
/* |
/* |
* cvs_update_file() |
* cvs_update_file() |