summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-03-24 05:14:49 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-03-24 05:14:49 +0000
commit80fcb5d370cf852c06beef2ad10204c3cecd42d4 (patch)
tree7554f8bb91dd856c693d86ab2b2822d084127d18 /usr.bin
parent2bf0aa5f5911d76099d160802d34f1a621efcde6 (diff)
Allow the -x flag to be used without an extension.
``that makes sense'' xsa@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/ci.c7
-rw-r--r--usr.bin/rcs/co.c7
-rw-r--r--usr.bin/rcs/rcsclean.c7
-rw-r--r--usr.bin/rcs/rcsdiff.c7
-rw-r--r--usr.bin/rcs/rcsmerge.c7
-rw-r--r--usr.bin/rcs/rcsprog.c7
-rw-r--r--usr.bin/rcs/rlog.c7
7 files changed, 28 insertions, 21 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 5dcad5bc3f3..924e4d1a2aa 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.124 2006/03/23 08:50:41 xsa Exp $ */
+/* $OpenBSD: ci.c,v 1.125 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -29,7 +29,7 @@
#include "rcsprog.h"
#include "diff.h"
-#define CI_OPTSTRING "d::f::I::i::j::k::l::m:M::N:n:qr::s:Tt:u::Vw:x:z:"
+#define CI_OPTSTRING "d::f::I::i::j::k::l::m:M::N:n:qr::s:Tt:u::Vw:x::z:"
#define DATE_NOW -1
#define DATE_MTIME -2
@@ -205,7 +205,8 @@ checkin_main(int argc, char **argv)
pb.author = xstrdup(rcs_optarg);
break;
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
timezone_flag = rcs_optarg;
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index 12282fa4ed8..20d2f9c4242 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.65 2006/03/17 13:09:26 niallo Exp $ */
+/* $OpenBSD: co.c,v 1.66 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -28,7 +28,7 @@
#include "rcsprog.h"
-#define CO_OPTSTRING "d:f::I::k:l::M::p::q::r::s:Tu::Vw::x:z:"
+#define CO_OPTSTRING "d:f::I::k:l::M::p::q::r::s:Tu::Vw::x::z:"
static void checkout_err_nobranch(RCSFILE *, const char *, const char *,
const char *, int);
@@ -127,7 +127,8 @@ checkout_main(int argc, char **argv)
flags |= CO_AUTHOR;
break;
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
timezone_flag = rcs_optarg;
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index 072a6da1ee8..4905e167482 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.26 2006/03/16 04:04:57 ray Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.27 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -46,7 +46,7 @@ rcsclean_main(int argc, char **argv)
rev = RCS_HEAD_REV;
- while ((ch = rcs_getopt(argc, argv, "k:n::q::r:Tu::Vx:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "k:n::q::r:Tu::Vx::")) != -1) {
switch (ch) {
case 'k':
kflag = rcs_kflag_get(rcs_optarg);
@@ -80,7 +80,8 @@ rcsclean_main(int argc, char **argv)
exit(0);
/* NOTREACHED */
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
default:
break;
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 6b5edb48943..24bad19731b 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.40 2006/03/20 16:18:13 niallo Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.41 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -48,7 +48,7 @@ rcsdiff_main(int argc, char **argv)
strlcpy(diffargs, "diff", sizeof(diffargs));
- while ((ch = rcs_getopt(argc, argv, "ck:nqr:TuVx:z:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "ck:nqr:TuVx::z:")) != -1) {
switch (ch) {
case 'c':
strlcat(diffargs, " -c", sizeof(diffargs));
@@ -93,7 +93,8 @@ rcsdiff_main(int argc, char **argv)
exit(0);
/* NOTREACHED */
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
timezone_flag = rcs_optarg;
diff --git a/usr.bin/rcs/rcsmerge.c b/usr.bin/rcs/rcsmerge.c
index 54f90713566..61679e4998b 100644
--- a/usr.bin/rcs/rcsmerge.c
+++ b/usr.bin/rcs/rcsmerge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsmerge.c,v 1.22 2006/03/23 08:50:41 xsa Exp $ */
+/* $OpenBSD: rcsmerge.c,v 1.23 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -42,7 +42,7 @@ rcsmerge_main(int argc, char **argv)
baserev = rev2 = RCS_HEAD_REV;
- while ((ch = rcs_getopt(argc, argv, "AEek:p::q::r:TVx:z:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "AEek:p::q::r:TVx::z:")) != -1) {
switch (ch) {
case 'A': case 'E': case 'e':
break;
@@ -81,7 +81,8 @@ rcsmerge_main(int argc, char **argv)
exit(0);
/* NOTREACHED */
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
timezone_flag = rcs_optarg;
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 0dc89c58a53..3b31242b1bc 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.84 2006/03/23 09:03:28 xsa Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.85 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -29,7 +29,7 @@
#include "rcsprog.h"
#define RCS_CMD_MAXARG 128
-#define RCSPROG_OPTSTRING "A:a:b::c:e::hik:Lm:Mn:N:qt::TUVx:z:"
+#define RCSPROG_OPTSTRING "A:a:b::c:e::hik:Lm:Mn:N:qt::TUVx::z:"
#define DESC_PROMPT "enter description, terminated with single '.' " \
"or end of file:\nNOTE: This is NOT the log message!" \
@@ -526,7 +526,8 @@ rcs_main(int argc, char **argv)
exit(0);
/* NOTREACHED */
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
/*
diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c
index eb2cb3899e8..fcdea352b57 100644
--- a/usr.bin/rcs/rlog.c
+++ b/usr.bin/rcs/rlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlog.c,v 1.32 2006/03/23 13:28:23 xsa Exp $ */
+/* $OpenBSD: rlog.c,v 1.33 2006/03/24 05:14:48 ray Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -60,7 +60,7 @@ rlog_main(int argc, char **argv)
char fpath[MAXPATHLEN];
hflag = Rflag = 0;
- while ((ch = rcs_getopt(argc, argv, "hLl::NqRs:TtVw::x:z:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "hLl::NqRs:TtVw::x::z:")) != -1) {
switch (ch) {
case 'h':
hflag = 1;
@@ -101,7 +101,8 @@ rlog_main(int argc, char **argv)
wlist = rcs_optarg;
break;
case 'x':
- rcs_suffixes = rcs_optarg;
+ /* Use blank extension if none given. */
+ rcs_suffixes = rcs_optarg ? rcs_optarg : "";
break;
case 'z':
timezone_flag = rcs_optarg;