From: Nick Ing-Simmons Date: Sun, 3 Mar 2002 09:59:59 +0000 (+0000) Subject: Integrate mainline X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16efc830361354bffd3f9ad0f87f9161956bbe01;p=p5sagit%2Fp5-mst-13.2.git Integrate mainline p4raw-id: //depot/perlio@14960 --- 16efc830361354bffd3f9ad0f87f9161956bbe01 diff --cc ext/Encode/compile index 0ff1e66,6c04aab..6eda5b9 --- a/ext/Encode/compile +++ b/ext/Encode/compile @@@ -121,12 -120,12 +121,13 @@@ eval "\@ARGV = map(glob(\$_),\@ARGV)" i my %opt; # I think these are: # -Q to disable the duplicate codepoint test ++# -S make mapping errors fatal # -q to remove comments written to output files # -O to enable the (brute force) substring optimiser # -o to specify the output file name (else it's the first arg) # -f to give a file with a list of input files (else use the args) # -n to name the encoding (else use the basename of the input file. --getopts('QqOo:f:n:',\%opt); ++getopts('SQqOo:f:n:',\%opt); # This really should go first, else the die here causes empty (non-erroneous) # output files to be written. @@@ -442,6 -441,6 +443,7 @@@ sub compile_en my $v = hex($def); $rep = &$type_func($v & 0xFF, ($v >> 8) & 0xffe); } ++ my $errors; my $seen; # use -Q to silence the seen test. Makefile.PL uses this by default. $seen = {} unless $opt{Q}; @@@ -484,6 -483,6 +486,7 @@@ { warn sprintf("U%04X is %02X%02X and %04X\n", $val,$page,$ch,$seen->{$uch}); ++ $errors++; } else { @@@ -506,6 -505,6 +509,7 @@@ } while --$pages; die "\$min_el=$min_el, \$max_el=$max_el - seems we read no lines" if $min_el > $max_el; ++ die "$errors mapping conflicts\n" if ($errors && $opt{'S'}); $encoding{$name} = [$e2u,$u2e,$rep,$min_el,$max_el]; }