X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.pl;h=febd5505521923dbcfad170f815c2d429c936ebc;hb=b2a156bd8e464af88881c77344280160fd844dcf;hp=cfe59adc2213c1845ab116dacdd33ff7045e25e7;hpb=d09b2d29781629d5f0436d3a59d2552621af768b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.pl b/regcomp.pl index cfe59ad..febd550 100644 --- a/regcomp.pl +++ b/regcomp.pl @@ -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; @@ -12,16 +16,20 @@ while () { } close DESC; $tot = $ind; +die "Too many regexp opcodes! Maximum is 256, but there are $tot in file!" + if $tot>256; $tmp_h = 'tmp_reg.h'; unlink $tmp_h if -f $tmp_h; open OUT, ">$tmp_h"; +binmode OUT; print OUT <