summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcsclean.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-10-06 02:12:54 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-10-06 02:12:54 +0000
commit16a189c852ef60742dc6354ab0317e1b8d8703fa (patch)
tree430eba0f3fdbb2de76e41a072fe4727540608b71 /usr.bin/rcs/rcsclean.c
parentd0dfff088dcf2a23e83f1e94a6f1e9068b8c6409 (diff)
add -r flag and sync usage;
Diffstat (limited to 'usr.bin/rcs/rcsclean.c')
-rw-r--r--usr.bin/rcs/rcsclean.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index b31e90f04e1..98bb6fd0808 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.1 2005/10/06 02:00:05 joris Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.2 2005/10/06 02:12:53 joris Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -51,11 +51,17 @@ rcsclean_main(int argc, char **argv)
rev = RCS_HEAD_REV;
- while ((ch = getopt(argc, argv, "qV")) != -1) {
+ while ((ch = getopt(argc, argv, "qr:V")) != -1) {
switch (ch) {
case 'q':
verbose = 0;
break;
+ case 'r':
+ if ((rev = rcsnum_parse(optarg)) == NULL) {
+ cvs_log(LP_ERR, "bad revision number");
+ exit(1);
+ }
+ break;
case 'V':
printf("%s\n", rcs_version);
exit(0);
@@ -92,7 +98,7 @@ rcsclean_main(int argc, char **argv)
void
rcsclean_usage(void)
{
- fprintf(stderr, "usage %s [file] ...\n", __progname);
+ fprintf(stderr, "usage %s [-qV] [-r rev] [file] ...\n", __progname);
}
static int