summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/rcsprog.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-10-19 00:30:23 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-10-19 00:30:23 +0000
commitfaba2c88bdfc6baabd8053aabd7f7fd189cb4499 (patch)
tree985b7fc238d63fd1b5220fe84d32ef89078e5ab2 /usr.bin/rcs/rcsprog.c
parent8d9431487e8505c034f1f8f4e46c4aedcbf7648f (diff)
add co -p support;
input from xsa@ and niallo@;
Diffstat (limited to 'usr.bin/rcs/rcsprog.c')
-rw-r--r--usr.bin/rcs/rcsprog.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index ba6b4183888..50821390348 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.33 2005/10/18 16:20:31 xsa Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.34 2005/10/19 00:30:22 joris Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -46,6 +46,7 @@
const char rcs_version[] = "OpenCVS RCS version 3.6";
int verbose = 1;
+int pipeout = 0;
int rcs_optind;
char *rcs_optarg;
@@ -208,9 +209,13 @@ rcs_statfile(char *fname, char *out, size_t len)
if ((verbose == 1) && (strcmp(__progname, "rcsclean"))) {
if (!strcmp(__progname, "co")) {
printf("%s --> ", fpath);
- if ((s = strrchr(filev, ',')) != NULL) {
- *s = '\0';
- printf("%s\n", fname);
+ if (pipeout == 1) {
+ printf("standard output\n");
+ } else {
+ if ((s = strrchr(filev, ',')) != NULL) {
+ *s = '\0';
+ printf("%s\n", fname);
+ }
}
} else {
printf("RCS file: %s\n", fpath);