This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove 3 unused scripts from Porting
authorNicholas Clark <nick@ccl4.org>
Tue, 30 Aug 2011 16:06:38 +0000 (18:06 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 30 Aug 2011 16:06:38 +0000 (18:06 +0200)
Porting/findvars was added in 1998 in 2bd2b9e04a68ec86. It searches @ARGV for
its wordlist of then-current interpreter variable names.
Porting/fixvars was added as fixvars in 1998 in a15299417de39f35. It captures
the output of make (defaulting to make miniperl), parses it for errors
matching /undeclared/, and then attempts to edit the relevant line of the
reported file to prefix the name with PL_
Porting/fixCORE is a modified copy of Porting/fixvars, added in 1998 in
a8693bd382efcc6d. It's intended to load modules, catching errors of the form
/Ambiguous call resolved as CORE::/, and editing the relevant lines to prefix
CORE:: to the function in question. It appears only ever to have been used to
fix warnings in Math::Complex.

All 3 have only had trivial style and spelling edits since addition, and
have been unused for over 12 years.

MANIFEST
Porting/findvars [deleted file]
Porting/fixCORE [deleted file]
Porting/fixvars [deleted file]

index e74b2ad..231a60f 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4540,9 +4540,6 @@ Porting/exec-bit.txt              List of files that get +x in release tarball
 Porting/exercise_makedef.pl    Brute force testing for makedef.pl
 Porting/expand-macro.pl                A tool to expand C macro definitions in the Perl source
 Porting/findrfuncs             Find reentrant variants of functions used in an executable
-Porting/findvars               Find occurrences of words
-Porting/fixCORE                        Find and fix modules that generate warnings
-Porting/fixvars                        Find undeclared variables with C compiler and fix em
 Porting/genlog                 Generate formatted changelogs by querying p4d
 Porting/git-deltatool          Mark commits for perldelta in git notes
 Porting/git-find-p4-change     Find the change for a p4 change number
diff --git a/Porting/findvars b/Porting/findvars
deleted file mode 100644 (file)
index 173175e..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-#!/usr/bin/perl -w
-
-$pat = '';
-# construct word list
-while (<DATA>) {
-  chomp;
-  next unless $_;
-  $pat .= "$_|";
-}
-chop $pat if $pat =~ /\|$/;
-
-# grep
-while (<>) {
-    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;
-}
-__END__
-Argv
-Cmd
-DBcv
-DBgv
-DBline
-DBsignal
-DBsingle
-DBsub
-DBtrace
-No
-Sv
-Xpv
-Yes
-amagic_generation
-ampergv
-an
-archpat_auto
-argvgv
-argvoutgv
-av_fetch_sv
-basetime
-beginav
-bodytarget
-bostr
-bufend
-bufptr
-cddir
-chopset
-collation_ix
-collation_name
-collation_standard
-collxfrm_base
-collxfrm_mult
-colors
-colorset
-compcv
-compiling
-comppad
-comppad_name
-comppad_name_fill
-comppad_name_floor
-cop_seqmax
-copline
-cryptseen
-cshlen
-cshname
-curcop
-curcopdb
-curinterp
-curpad
-curpm
-curstack
-curstackinfo
-curstash
-curstname
-dbargs
-debdelim
-debname
-debstash
-debug
-defgv
-defoutgv
-defstash
-delaymagic
-diehook
-dirty
-dlevel
-dlmax
-do_undump
-doextract
-doswitches
-dowarn
-dumplvl
-e_script
-egid
-endav
-envgv
-errgv
-error_count
-euid
-eval_root
-eval_start
-evalseq
-exitlist
-exitlistlen
-expect
-extralen
-fdpid
-filemode
-firstgv
-forkprocess
-formfeed
-formtarget
-generation
-gensym
-gid
-globalstash
-he_root
-hexdigit
-hintgv
-hints
-hv_fetch_ent_mh
-hv_fetch_sv
-in_clean_all
-in_clean_objs
-in_eval
-in_my
-in_my_stash
-incgv
-initav
-inplace
-last_in_gv
-last_lop
-last_lop_op
-last_proto
-last_uni
-lastfd
-lastgotoprobe
-lastscream
-lastsize
-lastspbase
-laststatval
-laststype
-leftgv
-lex_brackets
-lex_brackstack
-lex_casemods
-lex_casestack
-lex_defer
-lex_dojoin
-lex_expect
-lex_fakebrack
-lex_formbrack
-lex_inpat
-lex_inwhat
-lex_op
-lex_repl
-lex_starts
-lex_state
-lex_stuff
-lineary
-linestart
-linestr
-localizing
-localpatches
-main_cv
-main_root
-main_start
-mainstack
-malloc_mutex
-markstack
-markstack_max
-markstack_ptr
-max_intro_pending
-maxo
-maxscream
-maxsysfd
-mess_sv
-min_intro_pending
-minus_F
-minus_a
-minus_c
-minus_l
-minus_n
-minus_p
-modcount
-modglobal
-multi_close
-multi_end
-multi_open
-multi_start
-multiline
-mystrk
-na
-nexttoke
-nexttype
-nextval
-ninterps
-nomemok
-numeric_local
-numeric_name
-numeric_standard
-ofmt
-ofs
-ofslen
-oldbufptr
-oldlastpm
-oldname
-oldoldbufptr
-op
-op_mask
-op_seqmax
-opsave
-origalen
-origargc
-origargv
-origenviron
-origfilename
-ors
-orslen
-osname
-pad_reset_pending
-padix
-padix_floor
-patchlevel
-patleave
-pending_ident
-perl_destruct_level
-perldb
-pidstatus
-preambleav
-preambled
-preprocess
-profiledata
-reg_eval_set
-reg_flags
-reg_start_tmp
-reg_start_tmpl
-regbol
-regcc
-regcode
-regcomp_parse
-regcomp_rx
-regcompp
-regdata
-regdummy
-regendp
-regeol
-regexecp
-regflags
-regindent
-reginput
-reginterp_cnt
-reglastparen
-regnarrate
-regnaughty
-regnpar
-regprecomp
-regprev
-regprogram
-regsawback
-regseen
-regsize
-regstartp
-regtill
-regxend
-replgv
-restartop
-retstack
-retstack_ix
-retstack_max
-rightgv
-rs
-rsfp
-rsfp_filters
-runops
-savestack
-savestack_ix
-savestack_max
-sawampersand
-sawstudy
-sawvec
-scopestack
-scopestack_ix
-scopestack_max
-screamfirst
-screamnext
-secondgv
-seen_evals
-seen_zerolen
-sh_path
-siggv
-sighandlerp
-sortcop
-sortcxix
-sortstash
-specialsv_list
-splitstr
-stack_base
-stack_max
-stack_sp
-start_env
-statbuf
-statcache
-statgv
-statname
-statusvalue
-statusvalue_vms
-stdingv
-strchop
-strtab
-sub_generation
-sublex_info
-subline
-subname
-sv_arenaroot
-sv_count
-sv_no
-sv_objcount
-sv_root
-sv_undef
-sv_yes
-sys_intern
-tainted
-tainting
-thisexpr
-thr_key
-timesbuf
-tmps_floor
-tmps_ix
-tmps_max
-tmps_stack
-tokenbuf
-top_env
-toptarget
-uid
-unsafe
-warnhook
-xiv_arenaroot
-xiv_root
-xnv_root
-xpv_root
-xrv_root
-piMem
-piENV
-piStdIO
-piLIO
-piDir
-piSock
-piProc
diff --git a/Porting/fixCORE b/Porting/fixCORE
deleted file mode 100644 (file)
index c902857..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/perl -w
-use Data::Dumper;
-
-my $targ = shift;
-my $inc  = join(' ',map("-I$_",@INC));
-
-my $work = 1;
-while ($work)
- {
-  open(PIPE,"$^X -w $inc -M$targ -e '' 2>&1 |") || die "Cannot open pipe to child:$!";
-  my %fix;
-  while (<PIPE>)
-   {
-    if (/^Ambiguous call resolved as CORE::(\w+)\(\), qualify as such or use \& at (\S+) line (\d+)/
-         && -f $2 )
-     {
-      my ($var,$file,$line) = ($1,$2,$3);
-      $fix{$file} = [] unless exists $fix{$file}; 
-      push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
-     }
-    print;
-   }
-  close(PIPE);
-# warn "Make returned $?\n";
-# last unless $?;
-  my $changed = 0;
-  foreach my $file (keys %fix)
-   {          
-    my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
-    my @miss;
-    my $fixed = 0;
-    @ARGV = ($file);
-    $. = 0;
-    local $^I = '.sav';
-    while (<>)
-     {
-      while (@ar && $. == $ar[0][0])
-       {
-        my ($line,$var) = @{shift(@ar)};
-        if (s/(?<!CORE::)\b$var\b(?=\s*\()/CORE::$var/)
-         {
-          warn "$file:$line: FIX $var\n"; 
-          $fixed++;
-          $changed++;
-         }
-        else
-         {
-          push(@miss,[$line,$var,$_]);
-         }
-       }
-      print;
-     }
-    unless ($fixed)
-     {
-      rename("$file$^I",$file);
-      if (@miss)
-       {
-        while (@miss)
-         {
-          my ($line,$var,$txt) = @{shift(@miss)};
-          warn "$file:$line:$var | $txt";
-         }
-       }
-     }    
-   }
-  last unless $changed;
- }
-
diff --git a/Porting/fixvars b/Porting/fixvars
deleted file mode 100644 (file)
index a21ea42..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/perl -w
-use Data::Dumper;
-
-my $targ = (@ARGV) ? join(' ',@ARGV) : 'miniperl' ;
-
-my $work = 1;
-while ($work)
- {
-  open(PIPE,"make $targ 2>&1 |") || die "Cannot open pipe to make:$!";
-  my %fix;
-  while (<PIPE>)
-   {
-    if (/^(.*):(\d+):\s+\`(\w+)'\s+undeclared/ && -f $1 )
-     {
-      my ($file,$line,$var) = ($1,$2,$3);
-      $fix{$file} = [] unless exists $fix{$file}; 
-      push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
-     }
-    print;
-   }
-  close(PIPE);
-  warn "Make returned $?\n";
-  last unless $?;
-  my $changed = 0;
-  foreach my $file (keys %fix)
-   {          
-    my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
-    my @miss;
-    my $fixed = 0;
-    unless (-w $file)
-     {
-      system("d4","edit",$file);
-     }             
-    @ARGV = ($file);
-    $. = 0;
-    local $^I = '.sav';
-    while (<>)
-     {
-      while (@ar && $. == $ar[0][0])
-       {
-        my ($line,$var) = @{shift(@ar)};
-        if (s/\b$var\b/PL_$var/)
-         {
-          warn "$file:$line: FIX $var\n"; 
-          $fixed++;
-          $changed++;
-         }
-        else
-         {
-          push(@miss,[$line,$var,$_]);
-         }
-       }
-      print;
-     }
-    unless ($fixed)
-     {
-      rename("$file$^I",$file);
-      if (@miss)
-       {
-        while (@miss)
-         {
-          my ($line,$var,$txt) = @{shift(@miss)};
-          warn "$file:$line:$var | $txt";
-         }
-       }
-     }    
-   }
-  last unless $changed;
- }