Typing is for secretaries
[p5sagit/p5-mst-13.2.git] / regcomp.pl
index 700268d..3ba699b 100644 (file)
@@ -55,12 +55,9 @@ while (<DESC>) {
         
     }
 }
-my ($width,$rwidth,$twidth)=(0,0,0);
-for (1..@name) {
-    $width=length($name[$_]) if $name[$_] and $width<length($name[$_]);
-    $twidth=length($type[$_]) if $type[$_] and $twidth<length($type[$_]);
-    $rwidth=$width if $_ == $lastregop;
-}
+# use fixed width to keep the diffs between regcomp.pl recompiles
+# as small as possible.
+my ($width,$rwidth,$twidth)=(22,12,9);
 $lastregop ||= $ind;
 my $tot = $ind;
 close DESC;
@@ -160,10 +157,14 @@ while (++$ind <= $lastregop) {
 print OUT <<EOP;
 };
 
+#endif /* REG_COMP_C */
+
 /* reg_name[] - Opcode/state names in string form, for debugging */
 
-#ifdef DEBUGGING
-const char * reg_name[] = {
+#ifndef DOINIT
+EXTCONST char * PL_reg_name[];
+#else
+EXTCONST char * const PL_reg_name[] = {
 EOP
 
 $ind = 0;
@@ -184,12 +185,7 @@ while (++$ind <= $tot) {
 
 print OUT <<EOP;
 };
-#endif /* DEBUGGING */
-#else
-#ifdef DEBUGGING
-extern const char * reg_name[];
-#endif
-#endif /* REG_COMP_C */
+#endif /* DOINIT */
 
 /* ex: set ro: */
 EOP