From d7e7a17b7619a6de52951d095d3ee6463df41dfa Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 28 Jun 2000 19:26:53 +0000 Subject: [PATCH] be more tolerant of the copyright comment style used in the manual pages --- util/update_copyrights | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/util/update_copyrights b/util/update_copyrights index 2afdfcb103..0388d243c9 100644 --- a/util/update_copyrights +++ b/util/update_copyrights @@ -15,7 +15,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: update_copyrights,v 1.14 2000/06/22 22:24:05 tale Exp $ +# $Id: update_copyrights,v 1.15 2000/06/28 19:26:53 tale Exp $ require 5.002; @@ -101,6 +101,9 @@ while (<>) { print "$file: type '$type' not supported yet; skipping\n"; next; } + + ($nonspaceprefix = $prefix) =~ s/\s+$//; + open(SOURCE, "<$file") || die "can't open $file: $!"; $_ = ; if ($type eq "YACC") { @@ -148,8 +151,7 @@ while (<>) { $first = $_; } } elsif (($m4_comment || $zone_comment || $man_comment) && - /^\Q$prefix\E/) { - ($nonspaceprefix = $prefix) =~ s/\s+$//; + /^\Q$nonspaceprefix\E/) { while (/^\Q$nonspaceprefix\E\s*$/) { $_ = ; @@ -161,7 +163,7 @@ while (<>) { next; } while () { - if ($_ !~ /^\Q$prefix\E/) { + if ($_ !~ /^\Q$nonspaceprefix\E/) { $first = $_; last; }