diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2019-04-26 19:11:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2019-04-26 19:11:02 +0000 |
commit | 5e4e253938c3d3dec77fa5d0ab5d5fa28c55a681 (patch) | |
tree | 794069294eb7abffe8cee65943185358a54db4a5 /usr.bin/rcs/co.c | |
parent | 9bbb77069a55bc99eabca059c53e2de080a74192 (diff) |
There was an extra newline in some cases and missing one in others.
OK joris@
Diffstat (limited to 'usr.bin/rcs/co.c')
-rw-r--r-- | usr.bin/rcs/co.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index 34d189e5338..97e23967a9e 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.124 2019/01/09 18:00:45 joris Exp $ */ +/* $OpenBSD: co.c,v 1.125 2019/04/26 19:11:01 millert Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -394,6 +394,12 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, !(flags & CO_REVERT)) (void)fprintf(stderr, " (unlocked)\n"); } + } else { + if (file->rf_ndelta != 0) { + if (!(flags & QUIET) && !(flags & NEWFILE) && + !(flags & CO_REVERT)) + (void)fprintf(stderr, "\n"); + } } if ((flags & (PIPEOUT|FORCE)) == 0 && stat(dst, &st) != -1) { @@ -444,11 +450,6 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, ((flags & CO_LOCK) || (flags & CO_UNLOCK))) { (void)fprintf(stderr, "no revisions, so nothing can be %s\n", (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)) - (void)fprintf(stderr, "\n"); } if (flags & CO_LOCK) { |