From 3974d06f27877c075f99bc9560d1cd6f23ff9e4e Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 23 Jan 2011 10:51:29 +0000 Subject: [PATCH] Move the duplicated subroutine tab() into regen_lib.pl --- regen/keywords.pl | 7 ------- regen/opcode.pl | 8 -------- regen/regen_lib.pl | 6 ++++++ regen/warnings.pl | 9 --------- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/regen/keywords.pl b/regen/keywords.pl index 452bfc9..1a84112 100755 --- a/regen/keywords.pl +++ b/regen/keywords.pl @@ -34,13 +34,6 @@ while () { read_only_bottom_close_and_rename($kw); -########################################################################### -sub tab { - my ($l, $t) = @_; - $t .= "\t" x ($l - (length($t) + 1) / 8); - $t; -} -########################################################################### __END__ NULL diff --git a/regen/opcode.pl b/regen/opcode.pl index afb25e9..9b970ad 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -469,14 +469,6 @@ foreach ($oc, $on, $pp) { read_only_bottom_close_and_rename($_); } -########################################################################### -sub tab { - my ($l, $t) = @_; - $t .= "\t" x ($l - (length($t) + 1) / 8); - $t; -} -########################################################################### - # Some comments about 'T' opcode classifier: # Safe to set if the ppcode uses: diff --git a/regen/regen_lib.pl b/regen/regen_lib.pl index 90f10b5..86d3b6c 100644 --- a/regen/regen_lib.pl +++ b/regen/regen_lib.pl @@ -144,4 +144,10 @@ sub read_only_bottom_close_and_rename { rename_if_different($name, *{$fh}->{final_name}); } +sub tab { + my ($l, $t) = @_; + $t .= "\t" x ($l - (length($t) + 1) / 8); + $t; +} + 1; diff --git a/regen/warnings.pl b/regen/warnings.pl index 2b0ddcc..454035f 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -82,15 +82,6 @@ my $tree = { }], } ; -########################################################################### -sub tab { - my($l, $t) = @_; - $t .= "\t" x ($l - (length($t) + 1) / 8); - $t; -} - -########################################################################### - my %list ; my %Value ; my %ValueToName ; -- 2.7.4