Add a note in perltodo about a potential extension of readpipe()
[p5sagit/p5-mst-13.2.git] / regcomp.pl
index d7d0733..1809da3 100644 (file)
@@ -1,3 +1,7 @@
+BEGIN {
+    # Get function prototypes
+    require 'regen_lib.pl';
+}
 #use Fatal qw(open close rename chmod unlink);
 open DESC, 'regcomp.sym';
 $ind = 0;
@@ -57,7 +61,7 @@ print OUT <<EOP;
 
 
 #ifdef REG_COMP_C
-const static U8 regarglen[] = {
+static const U8 regarglen[] = {
 EOP
 
 $ind = 0;
@@ -73,7 +77,7 @@ EOP
 print OUT <<EOP;
 };
 
-const static char reg_off_by_arg[] = {
+static const char reg_off_by_arg[] = {
 EOP
 
 $ind = 0;
@@ -89,7 +93,7 @@ print OUT <<EOP;
 };
 
 #ifdef DEBUGGING
-const static char * const reg_name[] = {
+static const char * const reg_name[] = {
 EOP
 
 $ind = 0;
@@ -105,15 +109,13 @@ EOP
 print OUT <<EOP;
 };
 
-const static int reg_num = $tot;
+static const int reg_num = $tot;
 
 #endif /* DEBUGGING */
 #endif /* REG_COMP_C */
 
 EOP
 
-close OUT;
+close OUT or die "close $tmp_h: $!";
 
-chmod 0666, 'regnodes.h';
-unlink 'regnodes.h';
-rename $tmp_h, 'regnodes.h';
+safer_rename $tmp_h, 'regnodes.h';