changeset 4858:5b4f9564bfaf

(printlogline): Don't generate lines containing only white space.
author Paul Eggert <eggert@twinsun.com>
date Tue, 19 Oct 1993 02:50:31 +0000
parents 3ca316ec55e3
children aa1a42c0b779
files lib-src/=rcs2log lib-src/rcs2log
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/=rcs2log	Mon Oct 18 07:54:49 1993 +0000
+++ b/lib-src/=rcs2log	Tue Oct 19 02:50:31 1993 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.13.1.1 1993/09/24 00:54:33 eggert Exp $
+# $Id: rcs2log,v 1.15 1993/09/24 01:03:32 eggert Exp eggert $
 
 # Copyright 1992, 1993 Free Software Foundation, Inc.
 
@@ -259,7 +259,12 @@
 
 	# Print each line of the log, transliterating \r to \n.
 	while ((i = index(Log, CR)) != 0) {
-		printf "%s%s\n", sep, substr(Log, 1, i-1)
+		logline = substr(Log, 1, i-1)
+		if (logline ~ /[^	 ]/) {
+			printf "%s%s\n", sep, logline
+		} else {
+			print ""
+		}
 		sep = indent_string
 		Log = substr(Log, i+1)
 	}
--- a/lib-src/rcs2log	Mon Oct 18 07:54:49 1993 +0000
+++ b/lib-src/rcs2log	Tue Oct 19 02:50:31 1993 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.13.1.1 1993/09/24 00:54:33 eggert Exp $
+# $Id: rcs2log,v 1.15 1993/09/24 01:03:32 eggert Exp eggert $
 
 # Copyright 1992, 1993 Free Software Foundation, Inc.
 
@@ -259,7 +259,12 @@
 
 	# Print each line of the log, transliterating \r to \n.
 	while ((i = index(Log, CR)) != 0) {
-		printf "%s%s\n", sep, substr(Log, 1, i-1)
+		logline = substr(Log, 1, i-1)
+		if (logline ~ /[^	 ]/) {
+			printf "%s%s\n", sep, logline
+		} else {
+			print ""
+		}
 		sep = indent_string
 		Log = substr(Log, i+1)
 	}