make -t mode the default on emacs/dumb terminals
[p5sagit/p5-mst-13.2.git] / regcomp.pl
index d783218..d7d0733 100644 (file)
@@ -21,7 +21,7 @@ open OUT, ">$tmp_h";
 
 print OUT <<EOP;
 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
-   This file is built by regcomp.pl from regcomp.sym.  
+   This file is built by regcomp.pl from regcomp.sym.
    Any changes made here will be lost!
 */
 
@@ -79,7 +79,7 @@ EOP
 $ind = 0;
 while (++$ind <= $tot) {
   $size = $longj[$ind] || 0;
-  
+
   print OUT <<EOP;
        $size,          /* $name[$ind] */
 EOP
@@ -87,6 +87,27 @@ EOP
 
 print OUT <<EOP;
 };
+
+#ifdef DEBUGGING
+const static char * const reg_name[] = {
+EOP
+
+$ind = 0;
+while (++$ind <= $tot) {
+  $hind = sprintf "%#4x", $ind-1;
+  $size = $longj[$ind] || 0;
+
+  print OUT <<EOP;
+       "$name[$ind]",          /* $hind */
+EOP
+}
+
+print OUT <<EOP;
+};
+
+const static int reg_num = $tot;
+
+#endif /* DEBUGGING */
 #endif /* REG_COMP_C */
 
 EOP