summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/co.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-05-11 09:43:20 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-05-11 09:43:20 +0000
commit6003f9c19f469cd7eb74a1ab3f4f300bd1df7fb2 (patch)
treeaeb252aeb66e52dd873cde9f6d86bc65f8e9b7df /usr.bin/rcs/co.c
parentafce4245e4053873827a44c5265d09ec0d9073f5 (diff)
fix informative msg's wrt to -q and stderr. now matches gnu/usr.bin/rcs.
Diffstat (limited to 'usr.bin/rcs/co.c')
-rw-r--r--usr.bin/rcs/co.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index de033777082..3d6b04fad72 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.89 2006/05/09 12:33:42 ray Exp $ */
+/* $OpenBSD: co.c,v 1.90 2006/05/11 09:43:19 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -156,7 +156,7 @@ checkout_main(int argc, char **argv)
continue;
if (!(flags & QUIET))
- printf("%s --> %s\n", fpath,
+ (void)fprintf(stderr, "%s --> %s\n", fpath,
(flags & PIPEOUT) ? "standard output" : argv[i]);
if ((flags & CO_LOCK) && (kflag & RCS_KWEXP_VAL)) {
@@ -197,7 +197,7 @@ checkout_main(int argc, char **argv)
}
if (!(flags & QUIET))
- printf("done\n");
+ (void)fprintf(stderr, "done\n");
rcsnum_free(rev);
@@ -257,8 +257,9 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags,
if (date != NULL)
givendate = rcs_date_parse(date);
- if (file->rf_ndelta == 0)
- printf("no revisions present; generating empty revision 0.0\n");
+ if (file->rf_ndelta == 0 && !(flags & QUIET))
+ (void)fprintf(stderr,
+ "no revisions present; generating empty revision 0.0\n");
/* XXX rcsnum_cmp()
* Check out the latest revision if <frev> is greater than HEAD
@@ -415,15 +416,15 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags,
}
}
- if (file->rf_ndelta == 0 &&
+ if (file->rf_ndelta == 0 && !(flags & QUIET) &&
((flags & CO_LOCK) || (flags & CO_UNLOCK))) {
- warnx("no revisions, so nothing can be %s",
+ (void)fprintf(stderr, "no revisions, so nothing can be %s",
(flags & CO_LOCK) ? "locked" : "unlocked");
} else if (file->rf_ndelta != 0) {
/* XXX - Not a good way to detect if a newline is needed. */
if (!(flags & QUIET) && !(flags & NEWFILE) &&
!(flags & CO_REVERT))
- printf("\n");
+ (void)fprintf(stderr, "\n");
}
if (flags & CO_LOCK) {