comparison lib-src/rcs2log @ 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 7c75802f5a8b
children 2dba6eb73c65
comparison
equal deleted inserted replaced
4857:3ca316ec55e3 4858:5b4f9564bfaf
10 # Clump together log entries that start with `{topic} ', 10 # Clump together log entries that start with `{topic} ',
11 # where `topic' contains neither white space nor `}'. 11 # where `topic' contains neither white space nor `}'.
12 12
13 # Author: Paul Eggert <eggert@twinsun.com> 13 # Author: Paul Eggert <eggert@twinsun.com>
14 14
15 # $Id: rcs2log,v 1.13.1.1 1993/09/24 00:54:33 eggert Exp $ 15 # $Id: rcs2log,v 1.15 1993/09/24 01:03:32 eggert Exp eggert $
16 16
17 # Copyright 1992, 1993 Free Software Foundation, Inc. 17 # Copyright 1992, 1993 Free Software Foundation, Inc.
18 18
19 # This program is free software; you can redistribute it and/or modify 19 # This program is free software; you can redistribute it and/or modify
20 # it under the terms of the GNU General Public License as published by 20 # it under the terms of the GNU General Public License as published by
257 # Print the label. 257 # Print the label.
258 printf "%s*%s:", indent_string, files 258 printf "%s*%s:", indent_string, files
259 259
260 # Print each line of the log, transliterating \r to \n. 260 # Print each line of the log, transliterating \r to \n.
261 while ((i = index(Log, CR)) != 0) { 261 while ((i = index(Log, CR)) != 0) {
262 printf "%s%s\n", sep, substr(Log, 1, i-1) 262 logline = substr(Log, 1, i-1)
263 if (logline ~ /[^ ]/) {
264 printf "%s%s\n", sep, logline
265 } else {
266 print ""
267 }
263 sep = indent_string 268 sep = indent_string
264 Log = substr(Log, i+1) 269 Log = substr(Log, i+1)
265 } 270 }
266 }' 271 }'
267 272