Note that can be warned on implicit utf8 upgrade
[p5sagit/p5-mst-13.2.git] / regcomp.pl
index b6fc11d..7fdbd13 100644 (file)
@@ -1,3 +1,18 @@
+#!/usr/bin/perl
+# 
+# Regenerate (overwriting only if changed):
+#
+#    regnodes.h
+#
+# from information stored in
+#
+#    regcomp.sym
+#    regexp.h
+#
+# Accepts the standard regen_lib -q and -v args.
+#
+# This script is normally invoked from regen.pl.
+
 BEGIN {
     # Get function prototypes
     require 'regen_lib.pl';
@@ -64,7 +79,7 @@ close DESC;
 die "Too many regexp/state opcodes! Maximum is 256, but there are $lastregop in file!"
     if $lastregop>256;
 
-my $tmp_h = 'tmp_reg.h';
+my $tmp_h = 'regnodes.h-new';
 
 unlink $tmp_h if -f $tmp_h;
 
@@ -223,6 +238,6 @@ print $out <<EOP;
 
 /* ex: set ro: */
 EOP
-close $out or die "close $tmp_h: $!";
+safer_close($out);
 
 rename_if_different $tmp_h, 'regnodes.h';