* 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.
* Prints the RCS "log" (rlog) information for the specified files. With no
* argument, prints the log information for all the files in the directory
* (recursive by default).
static char rcsid
[] = "@(#)log.c 1.39 92/03/31";
static Dtype
log_dirproc (char *dir
, char *repository
, char *update_dir
);
static int log_fileproc (char *file
, char *update_dir
, char *repository
,
List
* entries
, List
* srcfiles
);
static int log_fileproc ();
static Dtype
log_dirproc ();
static char options
[PATH_MAX
];
static char *log_usage
[] =
"Usage: %s %s [-l] [rlog-options] [files...]\n",
"\t-l\tLocal directory only, no recursion.\n",
* All 'log' command options except -l are passed directly on to 'rlog'
options
[0] = '\0'; /* Assume none */
for (i
= 1; i
< argc
; i
++)
if (argv
[i
][0] == '-' || argv
[i
][0] == '\0')
(void) strcat (options
, " ");
(void) strcat (options
, argv
[i
]);
err
= start_recursion (log_fileproc
, (int (*) ()) NULL
, log_dirproc
,
(int (*) ()) NULL
, argc
, argv
, local
,
W_LOCAL
| W_REPOS
| W_ATTIC
, 0, 1,
log_fileproc (file
, update_dir
, repository
, entries
, srcfiles
)
p
= findnode (srcfiles
, file
);
if (p
== NULL
|| (rcsfile
= (RCSNode
*) p
->data
) == NULL
)
error (0, 0, "nothing known about %s", file
);
run_setup ("%s%s %s", Rcsbin
, RCS_RLOG
, options
);
if ((retcode
= run_exec (RUN_TTY
, RUN_TTY
, RUN_TTY
, RUN_REALLY
)) == -1)
error (1, errno
, "fork failed for rlog on %s", file
);
* Print a warm fuzzy message
log_dirproc (dir
, repository
, update_dir
)
error (0, 0, "Logging %s", update_dir
);