X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Ffindvars;h=26a4bcf11dab72979f524997ff5b0b3e0eeae281;hb=375b6f9c3cf61249fbff2151731131e9a0b72a6c;hp=2e81244ac86cb3b7118a199aa3fd745b1ebbb915;hpb=2bd2b9e04a68ec86766c4219cf4da7f0d3168395;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/findvars b/Porting/findvars index 2e81244..26a4bcf 100755 --- a/Porting/findvars +++ b/Porting/findvars @@ -1,4 +1,4 @@ -#!/l/local/bin/perl -w +#!/usr/bin/perl -w $pat = ''; # construct word list @@ -11,15 +11,17 @@ chop $pat if $pat =~ /\|$/; # grep while (<>) { - if (/^(.*?)\b($pat)\b(.*)$/o) { - my $head = "$1#$2#"; - $_ = $3; - while (/^(.*?)\b($pat)\b(.*)$/o) { - $head .= "$1#$2#"; - $_ = $3; - } - print "$ARGV\:$.\:$head$_\n"; - } + print "$ARGV\:$.\:$_" if s/\b($pat)\b/#$1#/og; +# this variant might useful if the transformation is more complicated +# if (/^(.*?)\b($pat)\b(.*)$/o) { +# my $head = "$1#$2#"; +# $_ = $3; +# while (/^(.*?)\b($pat)\b(.*)$/o) { +# $head .= "$1#$2#"; +# $_ = $3; +# } +# print "$ARGV\:$.\:$head$_\n"; +# } } continue { close ARGV if eof; @@ -210,7 +212,6 @@ nice_chunk nice_chunk_size ninterps nomemok -nrs nthreads nthreads_cond numeric_local @@ -238,7 +239,6 @@ osname pad_reset_pending padix padix_floor -parsehook patchlevel patleave pending_ident