* Copyright (c) 1992, Brian Berliner and Jeff Polk
* Copyright (c) 1989-1992, Brian Berliner
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS 1.3 kit.
* For now, this is basically a front end for rcs. All options are passed
static char rcsid
[] = "@(#)admin.c 1.17 92/03/31";
static Dtype
admin_dirproc (char *dir
, char *repos
, char *update_dir
);
static int admin_fileproc (char *file
, char *update_dir
,
char *repository
, List
*entries
,
static int admin_fileproc ();
static Dtype
admin_dirproc ();
static char *admin_usage
[] =
"Usage: %s %s rcs-options files...\n",
/* skip all optional arguments to see if we have any file names */
for (ac
= 1; ac
< argc
; ac
++)
if (ac
== 0 || argc
== 0)
/* start the recursion processor */
err
= start_recursion (admin_fileproc
, (int (*) ()) NULL
, admin_dirproc
,
(int (*) ()) NULL
, argc
, argv
, 0,
W_LOCAL
, 0, 1, (char *) NULL
, 1);
* Called to run "rcs" on a particular file.
admin_fileproc (file
, update_dir
, repository
, entries
, srcfiles
)
vers
= Version_TS (repository
, (char *) NULL
, (char *) NULL
, (char *) NULL
,
file
, 0, 0, entries
, srcfiles
);
else if (strcmp (version
, "0") == 0)
error (0, 0, "cannot admin newly added file `%s'", file
);
run_setup ("%s%s", Rcsbin
, RCS
);
for (argc
= ac
, argv
= av
; argc
; argc
--, argv
++)
run_arg (vers
->srcfile
->path
);
if ((retcode
= run_exec (RUN_TTY
, RUN_TTY
, RUN_TTY
, RUN_NORMAL
)) != 0)
error (0, retcode
== -1 ? errno
: 0,
"%s failed for `%s'", RCS
, file
);
* Print a warm fuzzy message
admin_dirproc (dir
, repos
, update_dir
)
error (0, 0, "Administrating %s", update_dir
);