home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / perl-4.036.tar.gz / perl-4.036.tar / perl-4.036 / x2p / s2p.SH (.txt) < prev    next >
Microsoft Windows Help File Content  |  1993-02-08  |  15KB  |  637 lines

  1. : This forces SH files to create target in same directory as SH file.
  2. : This is so that make depend always knows where to find SH derivatives.
  3. case "$0" in
  4. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  5. case $CONFIG in
  6.     if test ! -f config.sh; then
  7.     ln ../config.sh . || \
  8.     ln -s ../config.sh . || \
  9.     ln ../../config.sh . || \
  10.     ln ../../../config.sh . || \
  11.     (echo "Can't find config.sh."; exit 1)
  12.     fi 2>/dev/null
  13.     . ./config.sh
  14.     ;;
  15. echo "Extracting s2p (with variable substitutions)"
  16. : This section of the file will have variable substitutions done on it.
  17. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  18. : Protect any dollar signs and backticks that you do not want interpreted
  19. : by putting a backslash in front.  You may delete these comments.
  20. rm -f s2p
  21. $spitshell >s2p <<!GROK!THIS!
  22. #!$bin/perl
  23. eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  24.     if \$running_under_some_shell;
  25. \$bin = '$bin';
  26. !GROK!THIS!
  27. : In the following dollars and backticks do not need the extra backslash.
  28. $spitshell >>s2p <<'!NO!SUBS!'
  29. # $RCSfile: s2p.SH,v $$Revision: 4.0.1.2 $$Date: 92/06/08 17:26:31 $
  30. # $Log:    s2p.SH,v $
  31. # Revision 4.0.1.2  92/06/08  17:26:31  lwall
  32. # patch20: s2p didn't output portable startup code
  33. # patch20: added ... as variant on ..
  34. # patch20: s2p didn't translate s/pat/\&/ or s/pat/\$/ or s/pat/\\1/ right
  35. # Revision 4.0.1.1  91/06/07  12:19:18  lwall
  36. # patch4: s2p now handles embedded newlines better and optimizes common idioms
  37. # Revision 4.0  91/03/20  01:57:59  lwall
  38. # 4.0 baseline.
  39. $indent = 4;
  40. $shiftwidth = 4;
  41. $l = '{'; $r = '}';
  42. while ($ARGV[0] =~ /^-/) {
  43.     $_ = shift;
  44.   last if /^--/;
  45.     if (/^-D/) {
  46.     $debug++;
  47.     open(BODY,'>-');
  48.     next;
  49.     }
  50.     if (/^-n/) {
  51.     $assumen++;
  52.     next;
  53.     }
  54.     if (/^-p/) {
  55.     $assumep++;
  56.     next;
  57.     }
  58.     die "I don't recognize this switch: $_\n";
  59. unless ($debug) {
  60.     open(BODY,">/tmp/sperl$$") ||
  61.       &Die("Can't open temp file: $!\n");
  62. if (!$assumen && !$assumep) {
  63.     print BODY &q(<<'EOT');
  64. :    while ($ARGV[0] =~ /^-/) {
  65. :        $_ = shift;
  66. :      last if /^--/;
  67. :        if (/^-n/) {
  68. :        $nflag++;
  69. :        next;
  70. :        }
  71. :        die "I don't recognize this switch: $_\\n";
  72. print BODY &q(<<'EOT');
  73. :    #ifdef PRINTIT
  74. :    #ifdef ASSUMEP
  75. :    $printit++;
  76. :    #else
  77. :    $printit++ unless $nflag;
  78. :    #endif
  79. :    #endif
  80. :    <><>
  81. :    $\ = "\n";        # automatically add newline on print
  82. :    <><>
  83. :    #ifdef TOPLABEL
  84. :    LINE:
  85. :    while (chop($_ = <>)) {
  86. :    #else
  87. :    LINE:
  88. :    while (<>) {
  89. :        chop;
  90. :    #endif
  91. LINE:
  92. while (<>) {
  93.     # Wipe out surrounding whitespace.
  94.     s/[ \t]*(.*)\n$/$1/;
  95.     # Perhaps it's a label/comment.
  96.     if (/^:/) {
  97.     s/^:[ \t]*//;
  98.     $label = &make_label($_);
  99.     if ($. == 1) {
  100.         $toplabel = $label;
  101.         if (/^(top|(re)?start|redo|begin(ning)|again|input)$/i) {
  102.         $_ = <>;
  103.         redo LINE; # Never referenced, so delete it if not a comment.
  104.         }
  105.     $_ = "$label:";
  106.     if ($lastlinewaslabel++) {
  107.         $indent += 4;
  108.         print BODY &tab, ";\n";
  109.         $indent -= 4;
  110.     if ($indent >= 2) {
  111.         $indent -= 2;
  112.         $indmod = 2;
  113.     next;
  114.     } else {
  115.     $lastlinewaslabel = '';
  116.     }
  117.     # Look for one or two address clauses
  118.     $addr1 = '';
  119.     $addr2 = '';
  120.     if (s/^([0-9]+)//) {
  121.     $addr1 = "$1";
  122.     $addr1 = "\$. == $addr1" unless /^,/;
  123.     }
  124.     elsif (s/^\$//) {
  125.     $addr1 = 'eof()';
  126.     }
  127.     elsif (s|^/||) {
  128.     $addr1 = &fetchpat('/');
  129.     }
  130.     if (s/^,//) {
  131.     if (s/^([0-9]+)//) {
  132.         $addr2 = "$1";
  133.     } elsif (s/^\$//) {
  134.         $addr2 = "eof()";
  135.     } elsif (s|^/||) {
  136.         $addr2 = &fetchpat('/');
  137.     } else {
  138.         &Die("Invalid second address at line $.\n");
  139.     if ($addr2 =~ /^\d+$/) {
  140.         $addr1 .= "..$addr2";
  141.     else {
  142.         $addr1 .= "...$addr2";
  143.     }
  144.     # Now we check for metacommands {, }, and ! and worry
  145.     # about indentation.
  146.     s/^[ \t]+//;
  147.     # a { to keep vi happy
  148.     if ($_ eq '}') {
  149.     $indent -= 4;
  150.     next;
  151.     }
  152.     if (s/^!//) {
  153.     $if = 'unless';
  154.     $else = "$r else $l\n";
  155.     } else {
  156.     $if = 'if';
  157.     $else = '';
  158.     }
  159.     if (s/^{//) {    # a } to keep vi happy
  160.     $indmod = 4;
  161.     $redo = $_;
  162.     $_ = '';
  163.     $rmaybe = '';
  164.     } else {
  165.     $rmaybe = "\n$r";
  166.     if ($addr2 || $addr1) {
  167.         $space = ' ' x $shiftwidth;
  168.     } else {
  169.         $space = '';
  170.     $_ = &transmogrify();
  171.     }
  172.     # See if we can optimize to modifier form.
  173.     if ($addr1) {
  174.     if ($_ !~ /[\n{}]/ && $rmaybe && !$change &&
  175.       $_ !~ / if / && $_ !~ / unless /) {
  176.         s/;$/ $if $addr1;/;
  177.         $_ = substr($_,$shiftwidth,1000);
  178.     } else {
  179.         $_ = "$if ($addr1) $l\n$change$_$rmaybe";
  180.     $change = '';
  181.     next LINE;
  182.     }
  183. } continue {
  184.     @lines = split(/\n/,$_);
  185.     for (@lines) {
  186.     unless (s/^ *<<--//) {
  187.         print BODY &tab;
  188.     print BODY $_, "\n";
  189.     }
  190.     $indent += $indmod;
  191.     $indmod = 0;
  192.     if ($redo) {
  193.     $_ = $redo;
  194.     $redo = '';
  195.     redo LINE;
  196.     }
  197. if ($lastlinewaslabel++) {
  198.     $indent += 4;
  199.     print BODY &tab, ";\n";
  200.     $indent -= 4;
  201. if ($appendseen || $tseen || !$assumen) {
  202.     $printit++ if $dseen || (!$assumen && !$assumep);
  203.     print BODY &q(<<'EOT');
  204. :    #ifdef SAWNEXT
  205. :    continue {
  206. :    #endif
  207. :    #ifdef PRINTIT
  208. :    #ifdef DSEEN
  209. :    #ifdef ASSUMEP
  210. :        print if $printit++;
  211. :    #else
  212. :        if ($printit)
  213. :        { print; }
  214. :        else
  215. :        { $printit++ unless $nflag; }
  216. :    #endif
  217. :    #else
  218. :        print if $printit;
  219. :    #endif
  220. :    #else
  221. :        print;
  222. :    #endif
  223. :    #ifdef TSEEN
  224. :        $tflag = 0;
  225. :    #endif
  226. :    #ifdef APPENDSEEN
  227. :        if ($atext) { chop $atext; print $atext; $atext = ''; }
  228. :    #endif
  229. print BODY &q(<<'EOT');
  230. close BODY;
  231. unless ($debug) {
  232.     open(HEAD,">/tmp/sperl2$$.c")
  233.       || &Die("Can't open temp file 2: $!\n");
  234.     print HEAD "#define PRINTIT\n"    if $printit;
  235.     print HEAD "#define APPENDSEEN\n"    if $appendseen;
  236.     print HEAD "#define TSEEN\n"    if $tseen;
  237.     print HEAD "#define DSEEN\n"    if $dseen;
  238.     print HEAD "#define ASSUMEN\n"    if $assumen;
  239.     print HEAD "#define ASSUMEP\n"    if $assumep;
  240.     print HEAD "#define TOPLABEL\n"    if $toplabel;
  241.     print HEAD "#define SAWNEXT\n"    if $sawnext;
  242.     if ($opens) {print HEAD "$opens\n";}
  243.     open(BODY,"/tmp/sperl$$")
  244.       || &Die("Can't reopen temp file: $!\n");
  245.     while (<BODY>) {
  246.     print HEAD $_;
  247.     }
  248.     close HEAD;
  249.     print &q(<<"EOT");
  250. :    #!$bin/perl
  251. :    eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  252. :        if \$running_under_some_shell;
  253.     open(BODY,"cc -E /tmp/sperl2$$.c |") ||
  254.     &Die("Can't reopen temp file: $!\n");
  255.     while (<BODY>) {
  256.     /^# [0-9]/ && next;
  257.     /^[ \t]*$/ && next;
  258.     s/^<><>//;
  259.     print;
  260.     }
  261. &Cleanup;
  262. exit;
  263. sub Cleanup {
  264.     chdir "/tmp";
  265.     unlink "sperl$$", "sperl2$$", "sperl2$$.c";
  266. sub Die {
  267.     &Cleanup;
  268.     die $_[0];
  269. sub tab {
  270.     "\t" x ($indent / 8) . ' ' x ($indent % 8);
  271. sub make_filehandle {
  272.     local($_) = $_[0];
  273.     local($fname) = $_;
  274.     if (!$seen{$fname}) {
  275.     $_ = "FH_" . $_ if /^\d/;
  276.     s/[^a-zA-Z0-9]/_/g;
  277.     s/^_*//;
  278.     $_ = "\U$_";
  279.     if ($fhseen{$_}) {
  280.         for ($tmp = "a"; $fhseen{"$_$tmp"}; $a++) {}
  281.         $_ .= $tmp;
  282.     $fhseen{$_} = 1;
  283.     $opens .= &q(<<"EOT");
  284. :    open($_, '>$fname') || die "Can't create $fname: \$!";
  285.     $seen{$fname} = $_;
  286.     }
  287.     $seen{$fname};
  288. sub make_label {
  289.     local($label) = @_;
  290.     $label =~ s/[^a-zA-Z0-9]/_/g;
  291.     if ($label =~ /^[0-9_]/) { $label = 'L' . $label; }
  292.     $label = substr($label,0,8);
  293.     # Could be a reserved word, so capitalize it.
  294.     substr($label,0,1) =~ y/a-z/A-Z/
  295.       if $label =~ /^[a-z]/;
  296.     $label;
  297. sub transmogrify {
  298.     {    # case
  299.     if (/^d/) {
  300.         $dseen++;
  301.         chop($_ = &q(<<'EOT'));
  302. :    <<--#ifdef PRINTIT
  303. :    $printit = 0;
  304. :    <<--#endif
  305. :    next LINE;
  306.         $sawnext++;
  307.         next;
  308.     if (/^n/) {
  309.         chop($_ = &q(<<'EOT'));
  310. :    <<--#ifdef PRINTIT
  311. :    <<--#ifdef DSEEN
  312. :    <<--#ifdef ASSUMEP
  313. :    print if $printit++;
  314. :    <<--#else
  315. :    if ($printit)
  316. :        { print; }
  317. :    else
  318. :        { $printit++ unless $nflag; }
  319. :    <<--#endif
  320. :    <<--#else
  321. :    print if $printit;
  322. :    <<--#endif
  323. :    <<--#else
  324. :    print;
  325. :    <<--#endif
  326. :    <<--#ifdef APPENDSEEN
  327. :    if ($atext) {chop $atext; print $atext; $atext = '';}
  328. :    <<--#endif
  329. :    $_ = <>;
  330. :    chop;
  331. :    <<--#ifdef TSEEN
  332. :    $tflag = 0;
  333. :    <<--#endif
  334.         next;
  335.     if (/^a/) {
  336.         $appendseen++;
  337.         $command = $space . "\$atext .= <<'End_Of_Text';\n<<--";
  338.         $lastline = 0;
  339.         while (<>) {
  340.         s/^[ \t]*//;
  341.         s/^[\\]//;
  342.         unless (s|\\$||) { $lastline = 1;}
  343.         s/^([ \t]*\n)/<><>$1/;
  344.         $command .= $_;
  345.         $command .= '<<--';
  346.         last if $lastline;
  347.         }
  348.         $_ = $command . "End_Of_Text";
  349.         last;
  350.     if (/^[ic]/) {
  351.         if (/^c/) { $change = 1; }
  352.         $addr1 = 1 if $addr1 eq '';
  353.         $addr1 = '$iter = (' . $addr1 . ')';
  354.         $command = $space .
  355.           "    if (\$iter == 1) { print <<'End_Of_Text'; }\n<<--";
  356.         $lastline = 0;
  357.         while (<>) {
  358.         s/^[ \t]*//;
  359.         s/^[\\]//;
  360.         unless (s/\\$//) { $lastline = 1;}
  361.         s/'/\\'/g;
  362.         s/^([ \t]*\n)/<><>$1/;
  363.         $command .= $_;
  364.         $command .= '<<--';
  365.         last if $lastline;
  366.         }
  367.         $_ = $command . "End_Of_Text";
  368.         if ($change) {
  369.         $dseen++;
  370.         $change = "$_\n";
  371.         chop($_ = &q(<<"EOT"));
  372. :    <<--#ifdef PRINTIT
  373. :    $space\$printit = 0;
  374. :    <<--#endif
  375. :    ${space}next LINE;
  376.         $sawnext++;
  377.         }
  378.         last;
  379.     if (/^s/) {
  380.         $delim = substr($_,1,1);
  381.         $len = length($_);
  382.         $repl = $end = 0;
  383.         $inbracket = 0;
  384.         for ($i = 2; $i < $len; $i++) {
  385.         $c = substr($_,$i,1);
  386.         if ($c eq $delim) {
  387.             if ($inbracket) {
  388.             substr($_, $i, 0) = '\\';
  389.             $i++;
  390.             $len++;
  391.             }
  392.             else {
  393.             if ($repl) {
  394.                 $end = $i;
  395.                 last;
  396.             } else {
  397.                 $repl = $i;
  398.             }
  399.         elsif ($c eq '\\') {
  400.             $i++;
  401.             if ($i >= $len) {
  402.             $_ .= 'n';
  403.             $_ .= <>;
  404.             $len = length($_);
  405.             $_ = substr($_,0,--$len);
  406.             }
  407.             elsif (substr($_,$i,1) =~ /^[n]$/) {
  408.             }
  409.             elsif (!$repl &&
  410.               substr($_,$i,1) =~ /^[(){}\w]$/) {
  411.             $i--;
  412.             $len--;
  413.             substr($_, $i, 1) = '';
  414.             }
  415.             elsif (!$repl &&
  416.               substr($_,$i,1) =~ /^[<>]$/) {
  417.             substr($_,$i,1) = 'b';
  418.             }
  419.             elsif ($repl && substr($_,$i,1) =~ /^\d$/) {
  420.             substr($_,$i-1,1) = '$';
  421.             }
  422.         elsif ($c eq '&' && $repl) {
  423.             substr($_, $i, 0) = '$';
  424.             $i++;
  425.             $len++;
  426.         elsif ($c eq '$' && $repl) {
  427.             substr($_, $i, 0) = '\\';
  428.             $i++;
  429.             $len++;
  430.         elsif ($c eq '[' && !$repl) {
  431.             $i++ if substr($_,$i,1) eq '^';
  432.             $i++ if substr($_,$i,1) eq ']';
  433.             $inbracket = 1;
  434.         elsif ($c eq ']') {
  435.             $inbracket = 0;
  436.         elsif ($c eq "\t") {
  437.             substr($_, $i, 1) = '\\t';
  438.             $i++;
  439.             $len++;
  440.         elsif (!$repl && index("()+",$c) >= 0) {
  441.             substr($_, $i, 0) = '\\';
  442.             $i++;
  443.             $len++;
  444.         }
  445.         &Die("Malformed substitution at line $.\n")
  446.           unless $end;
  447.         $pat = substr($_, 0, $repl + 1);
  448.         $repl = substr($_, $repl+1, $end-$repl-1);
  449.         $end = substr($_, $end + 1, 1000);
  450.         &simplify($pat);
  451.         $dol = '$';
  452.         $subst = "$pat$repl$delim";
  453.         $cmd = '';
  454.         while ($end) {
  455.         if ($end =~ s/^g//) {
  456.             $subst .= 'g';
  457.             next;
  458.         if ($end =~ s/^p//) {
  459.             $cmd .= ' && (print)';
  460.             next;
  461.         if ($end =~ s/^w[ \t]*//) {
  462.             $fh = &make_filehandle($end);
  463.             $cmd .= " && (print $fh \$_)";
  464.             $end = '';
  465.             next;
  466.         &Die("Unrecognized substitution command".
  467.           "($end) at line $.\n");
  468.         }
  469.         chop ($_ = &q(<<"EOT"));
  470. :    <<--#ifdef TSEEN
  471. :    $subst && \$tflag++$cmd;
  472. :    <<--#else
  473. :    $subst$cmd;
  474. :    <<--#endif
  475.         next;
  476.     if (/^p/) {
  477.         $_ = 'print;';
  478.         next;
  479.     if (/^w/) {
  480.         s/^w[ \t]*//;
  481.         $fh = &make_filehandle($_);
  482.         $_ = "print $fh \$_;";
  483.         next;
  484.     if (/^r/) {
  485.         $appendseen++;
  486.         s/^r[ \t]*//;
  487.         $file = $_;
  488.         $_ = "\$atext .= `cat $file 2>/dev/null`;";
  489.         next;
  490.     if (/^P/) {
  491.         $_ = 'print $1 if /^(.*)/;';
  492.         next;
  493.     if (/^D/) {
  494.         chop($_ = &q(<<'EOT'));
  495. :    s/^.*\n?//;
  496. :    redo LINE if $_;
  497. :    next LINE;
  498.         $sawnext++;
  499.         next;
  500.     if (/^N/) {
  501.         chop($_ = &q(<<'EOT'));
  502. :    $_ .= "\n";
  503. :    $len1 = length;
  504. :    $_ .= <>;
  505. :    chop if $len1 < length;
  506. :    <<--#ifdef TSEEN
  507. :    $tflag = 0;
  508. :    <<--#endif
  509.         next;
  510.     if (/^h/) {
  511.         $_ = '$hold = $_;';
  512.         next;
  513.     if (/^H/) {
  514.         $_ = '$hold .= "\n"; $hold .= $_;';
  515.         next;
  516.     if (/^g/) {
  517.         $_ = '$_ = $hold;';
  518.         next;
  519.     if (/^G/) {
  520.         $_ = '$_ .= "\n"; $_ .= $hold;';
  521.         next;
  522.     if (/^x/) {
  523.         $_ = '($_, $hold) = ($hold, $_);';
  524.         next;
  525.     if (/^b$/) {
  526.         $_ = 'next LINE;';
  527.         $sawnext++;
  528.         next;
  529.     if (/^b/) {
  530.         s/^b[ \t]*//;
  531.         $lab = &make_label($_);
  532.         if ($lab eq $toplabel) {
  533.         $_ = 'redo LINE;';
  534.         } else {
  535.         $_ = "goto $lab;";
  536.         }
  537.         next;
  538.     if (/^t$/) {
  539.         $_ = 'next LINE if $tflag;';
  540.         $sawnext++;
  541.         $tseen++;
  542.         next;
  543.     if (/^t/) {
  544.         s/^t[ \t]*//;
  545.         $lab = &make_label($_);
  546.         $_ = q/if ($tflag) {$tflag = 0; /;
  547.         if ($lab eq $toplabel) {
  548.         $_ .= 'redo LINE;}';
  549.         } else {
  550.         $_ .= "goto $lab;}";
  551.         }
  552.         $tseen++;
  553.         next;
  554.     if (/^y/) {
  555.         s/abcdefghijklmnopqrstuvwxyz/a-z/g;
  556.         s/ABCDEFGHIJKLMNOPQRSTUVWXYZ/A-Z/g;
  557.         s/abcdef/a-f/g;
  558.         s/ABCDEF/A-F/g;
  559.         s/0123456789/0-9/g;
  560.         s/01234567/0-7/g;
  561.         $_ .= ';';
  562.     if (/^=/) {
  563.         $_ = 'print $.;';
  564.         next;
  565.     if (/^q/) {
  566.         chop($_ = &q(<<'EOT'));
  567. :    close(ARGV);
  568. :    @ARGV = ();
  569. :    next LINE;
  570.         $sawnext++;
  571.         next;
  572.     } continue {
  573.     if ($space) {
  574.         s/^/$space/;
  575.         s/(\n)(.)/$1$space$2/g;
  576.     last;
  577.     }
  578.     $_;
  579. sub fetchpat {
  580.     local($outer) = @_;
  581.     local($addr) = $outer;
  582.     local($inbracket);
  583.     local($prefix,$delim,$ch);
  584.     # Process pattern one potential delimiter at a time.
  585.     DELIM: while (s#^([^\]+(|)[\\/]*)([]+(|)[\\/])##) {
  586.     $prefix = $1;
  587.     $delim = $2;
  588.     if ($delim eq '\\') {
  589.         s/(.)//;
  590.         $ch = $1;
  591.         $delim = '' if $ch =~ /^[(){}A-Za-mo-z]$/;
  592.         $ch = 'b' if $ch =~ /^[<>]$/;
  593.         $delim .= $ch;
  594.     elsif ($delim eq '[') {
  595.         $inbracket = 1;
  596.         s/^\^// && ($delim .= '^');
  597.         s/^]// && ($delim .= ']');
  598.     elsif ($delim eq ']') {
  599.         $inbracket = 0;
  600.     elsif ($inbracket || $delim ne $outer) {
  601.         $delim = '\\' . $delim;
  602.     $addr .= $prefix;
  603.     $addr .= $delim;
  604.     if ($delim eq $outer && !$inbracket) {
  605.         last DELIM;
  606.     }
  607.     $addr =~ s/\t/\\t/g;
  608.     &simplify($addr);
  609.     $addr;
  610. sub q {
  611.     local($string) = @_;
  612.     local($*) = 1;
  613.     $string =~ s/^:\t?//g;
  614.     $string;
  615. sub simplify {
  616.     $_[0] =~ s/_a-za-z0-9/\\w/ig;
  617.     $_[0] =~ s/a-z_a-z0-9/\\w/ig;
  618.     $_[0] =~ s/a-za-z_0-9/\\w/ig;
  619.     $_[0] =~ s/a-za-z0-9_/\\w/ig;
  620.     $_[0] =~ s/_0-9a-za-z/\\w/ig;
  621.     $_[0] =~ s/0-9_a-za-z/\\w/ig;
  622.     $_[0] =~ s/0-9a-z_a-z/\\w/ig;
  623.     $_[0] =~ s/0-9a-za-z_/\\w/ig;
  624.     $_[0] =~ s/\[\\w\]/\\w/g;
  625.     $_[0] =~ s/\[^\\w\]/\\W/g;
  626.     $_[0] =~ s/\[0-9\]/\\d/g;
  627.     $_[0] =~ s/\[^0-9\]/\\D/g;
  628.     $_[0] =~ s/\\d\\d\*/\\d+/g;
  629.     $_[0] =~ s/\\D\\D\*/\\D+/g;
  630.     $_[0] =~ s/\\w\\w\*/\\w+/g;
  631.     $_[0] =~ s/\\t\\t\*/\\t+/g;
  632.     $_[0] =~ s/(\[.[^]]*\])\1\*/$1+/g;
  633.     $_[0] =~ s/([\w\s!@#%^&-=,:;'"])\1\*/$1+/g;
  634. !NO!SUBS!
  635. chmod 755 s2p
  636. $eunicefix s2p
  637.