comparison lib-src/=rcs2log @ 2639:0e6a6d065a94

mawk, SunOS 4.1.3 nawk, and Ultrix/MKS nawk all barf on /[/]/, so change it to /[\/]/. This should work on all Posix-compliant awks. It's slightly wrong with traditional (Unix version 7) awk, since it also allows \, but that's a minor problem compared to awk syntax errors.
author Paul Eggert <eggert@twinsun.com>
date Mon, 03 May 1993 17:55:22 +0000
parents 66371f0b8aff
children 9ee93fc9aba0
comparison
equal deleted inserted replaced
2638:5ff504c4ae11 2639:0e6a6d065a94
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.9 1993/01/15 05:33:29 eggert Exp $ 15 # $Id: rcs2log,v 1.10 1993/03/16 22:49:00 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
221 # Discard irrelevant rlog output. 221 # Discard irrelevant rlog output.
222 awk <$rlogout ' 222 awk <$rlogout '
223 /^Working file:/ { filename = $3 } 223 /^Working file:/ { filename = $3 }
224 /^date: /, /^(-----------*|===========*)$/ { 224 /^date: /, /^(-----------*|===========*)$/ {
225 if ($0 ~ /^branches: /) { next } 225 if ($0 ~ /^branches: /) { next }
226 if ($0 ~ /^date: [0-9][ /0-9:]*;/) { 226 if ($0 ~ /^date: [0-9][ \/0-9:]*;/) {
227 time = substr($3, 1, length($3)-1) 227 time = substr($3, 1, length($3)-1)
228 author = substr($5, 1, length($5)-1) 228 author = substr($5, 1, length($5)-1)
229 printf "%s %s %s %s %c", filename, $2, time, author, 13 229 printf "%s %s %s %s %c", filename, $2, time, author, 13
230 next 230 next
231 } 231 }