diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/rcsclean.c | 12 |
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 |