summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-02-13 11:02:59 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-02-13 11:02:59 +0000
commitc9ecd79504d35568f493d7f872aabc5fb7fb0f80 (patch)
tree09d618cfee42bfb04a12808eeb06551d88f1cef9 /usr.bin
parent4147c87973d438da2e318342f8cbfcaf433915a7 (diff)
write out an empty comment in RCS files even if there isn't one as
gnu/usr.bin/cvs does. Found by niallo@'s automatic tool.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/rcs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 5bfd1ae296e..92150101322 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.128 2006/02/09 08:08:56 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.129 2006/02/13 11:02:58 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -475,12 +475,13 @@ rcs_write(RCSFILE *rfp)
fprintf(fp, " strict;");
fputc('\n', fp);
+ fputs("comment\t@", fp);
if (rfp->rf_comment != NULL) {
- fputs("comment\t@", fp);
rcs_strprint((const u_char *)rfp->rf_comment,
strlen(rfp->rf_comment), fp);
fputs("@;\n", fp);
- }
+ } else
+ fputs("# @;\n", fp);
if (rfp->rf_expand != NULL) {
fputs("expand @", fp);