summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2005-11-12 22:50:00 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2005-11-12 22:50:00 +0000
commit6c00f4845f410681f736013e8139d721a201d747 (patch)
treec1376cb3f963a80c8b81c60da1ddc108495324c7 /usr.bin
parent642b5d9e93b48ab01913c7219294446234247cbe (diff)
- fix xsa breakage. char arrays on the stack are not NULL if empty. use
flags instead. - add a few more flags defines while i'm here.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/rcsprog.c5
-rw-r--r--usr.bin/rcs/rcsprog.h21
2 files changed, 15 insertions, 11 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 943c01db69c..fd5cb88bac0 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.40 2005/11/12 21:34:48 niallo Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.41 2005/11/12 22:49:59 niallo Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -286,6 +286,7 @@ rcs_main(int argc, char **argv)
case 'A':
if (rcs_statfile(rcs_optarg, ofpath, sizeof(ofpath)) < 0)
exit(1);
+ flags |= CO_ACLAPPEND;
break;
case 'a':
alist = rcs_optarg;
@@ -388,7 +389,7 @@ rcs_main(int argc, char **argv)
}
/* entries to add from <oldfile> */
- if (ofpath != NULL) {
+ if (flags & CO_ACLAPPEND) {
/* XXX */
if ((oldfile = rcs_open(ofpath, RCS_READ)) == NULL)
exit(1);
diff --git a/usr.bin/rcs/rcsprog.h b/usr.bin/rcs/rcsprog.h
index ec97e287979..9c15fb8c707 100644
--- a/usr.bin/rcs/rcsprog.h
+++ b/usr.bin/rcs/rcsprog.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.h,v 1.19 2005/11/08 09:22:48 xsa Exp $ */
+/* $OpenBSD: rcsprog.h,v 1.20 2005/11/12 22:49:59 niallo Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -30,18 +30,21 @@
#define RCS_TMPDIR_DEFAULT "/tmp"
/* flags specific to ci.c */
-#define CI_SYMFORCE (1<<0)
-#define CI_DEFAULT (1<<1)
+#define CI_SYMFORCE (1<<0)
+#define CI_DEFAULT (1<<1)
+#define CI_INIT (1<<2)
/* flags specific to co.c */
-#define CO_LOCK (1<<2)
-#define CO_REVDATE (1<<2)
-#define CO_STATE (1<<3)
-#define CO_UNLOCK (1<<4)
+#define CO_ACLAPPEND (1<<3)
+#define CO_LOCK (1<<4)
+#define CO_REVDATE (1<<5)
+#define CO_STATE (1<<6)
+#define CO_UNLOCK (1<<7)
/* shared flags */
-#define FORCE (1<<5)
-#define INTERACTIVE (1<<6)
+#define FORCE (1<<8)
+#define INTERACTIVE (1<<9)
+#define NEWFILE (1<<10)
extern char *__progname;
extern const char rcs_version[];