hand apply whitespace mutiliated patch
[p5sagit/p5-mst-13.2.git] / opcode.pl
index 1ef36f2..af030df 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -77,6 +77,8 @@ print <<END;
 };
 #endif
 
+START_EXTERN_C
+
 END
 
 # Emit function declarations.
@@ -95,10 +97,12 @@ for (@ops) {
 
 print <<END;
 
+END_EXTERN_C
+
 #ifndef DOINIT
-EXT OP * (*ppaddr[])();
+EXT OP * (*ppaddr[])(ARGSproto);
 #else
-EXT OP * (*ppaddr[])() = {
+EXT OP * (*ppaddr[])(ARGSproto) = {
 END
 
 for (@ops) {
@@ -180,8 +184,6 @@ for (@ops) {
     $argsum |= 128 if $flags =~ /u/;           # defaults to $_
 
     $flags =~ /([^a-zA-Z])/ or die qq[Opcode "$_" has no class indicator];
-    printf STDERR "op $_, class $1 => 0x%x, argsum 0x%x",
-       $opclass{$1}, $argsum; # debug
     $argsum |= $opclass{$1} << 8;
     $mul = 4096;                               # 2 ^ OASHIFT
     for $arg (split(' ',$args{$_})) {
@@ -190,7 +192,6 @@ for (@ops) {
        $argsum += $argnum * $mul;
        $mul <<= 4;
     }
-    printf STDERR ", argsum now 0x%x\n", $argsum; # debug
     $argsum = sprintf("0x%08x", $argsum);
     print "\t", &tab(3, "$argsum,"), "/* $_ */\n";
 }
@@ -361,7 +362,7 @@ abs         abs                     ck_fun          fstu%   S?
 # String stuff.
 
 length         length                  ck_lengthconst  istu%   S?
-substr         substr                  ck_fun          st@     S S S?
+substr         substr                  ck_fun          st@     S S S? S?
 vec            vec                     ck_fun          ist@    S S S
 
 index          index                   ck_index        ist@    S S S?
@@ -680,3 +681,4 @@ syscall             syscall                 ck_fun          imst@   S L
 
 # For multi-threading
 lock           lock                    ck_rfun         s%      S
+threadsv       per-thread variable     ck_null         ds0