From: Craig A. Berry Date: Fri, 4 Dec 2009 23:48:27 +0000 (-0600) Subject: Port lib/unicore/mktables to VMS. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=517956bf3975a79f7429698dce4510d4616b19a3;p=p5sagit%2Fp5-mst-13.2.git Port lib/unicore/mktables to VMS. This is mostly just making filename comparisons and lookups of filenames in hashes case blind, which is necessary since filename case is not (by default) preserved. --- diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 0e6e48e..f39466a 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1806,7 +1806,7 @@ sub trace { return main::trace(@_); } # Here, the file exists if ($seen_non_extracted_non_age) { - if ($file =~ /$EXTRACTED/) { + if ($file =~ /$EXTRACTED/i) { Carp::my_carp_bug(join_lines(<rel2abs($file)} + my $fkey = File::Spec->rel2abs($file); + my $expecting = delete $potential_files{$fkey}; + $expecting = delete $potential_files{lc($fkey)} unless defined $expecting; + Carp::my_carp("Was not expecting '$file'.") if + ! $expecting && ! defined $handle{$addr}; # Open the file, converting the slashes used in this program @@ -8919,7 +8922,7 @@ END Carp::carp_extra_args(\@_) if main::DEBUG && @_; my $Perl_decomp = Property->new('Perl_Decomposition_Mapping', - Directory => '.', + Directory => File::Spec->curdir(), File => 'Decomposition', Format => $STRING_FORMAT, Internal_Only_Warning => 1, @@ -10817,7 +10820,7 @@ sub compile_perl() { my $perl_charname = Property->new('Perl_Charnames', Core_Access => '\N{...} and charnames.pm', Default_Map => "", - Directory => '.', + Directory => File::Spec->curdir(), File => 'Name', Internal_Only_Warning => 1, Perl_Extension => 1, @@ -10904,7 +10907,7 @@ END Type => $ENUM, Initialize => $ccc, File => 'CombiningClass', - Directory => '.', + Directory => File::Spec->curdir(), ); $perl_ccc->set_to_output_map(1); $perl_ccc->add_comment(join_lines(<sub { return unless /\.txt$/i; return if /Test\.txt$/i; - my $full = File::Spec->rel2abs($_); + my $full = lc(File::Spec->rel2abs($_)); $potential_files{$full} = 1 - if ! grep { $full eq $_ } @ignored_files_full_names; + if ! grep { $full eq lc($_) } @ignored_files_full_names; return; } }, File::Spec->curdir()); @@ -13526,9 +13529,9 @@ else { # The paths are stored with relative names, and with '/' as the # delimiter; convert to absolute on this machine - my $full = File::Spec->rel2abs(internal_file_to_platform($input)); + my $full = lc(File::Spec->rel2abs(internal_file_to_platform($input))); $potential_files{$full} = 1 - if ! grep { $full eq $_ } @ignored_files_full_names; + if ! grep { lc($full) eq lc($_) } @ignored_files_full_names; } } @@ -13549,7 +13552,7 @@ if ($glob_list) { my @unknown_input_files; foreach my $file (keys %potential_files) { - next if grep { $file eq $_ } @known_files; + next if grep { lc($file) eq lc($_) } @known_files; # Here, the file is unknown to us. Get relative path name $file = File::Spec->abs2rel($file); @@ -13577,8 +13580,8 @@ if ($glob_list) { # $compare_versions is set. for (my $i = 0; $i < @input_file_objects; $i++) { if ($input_file_objects[$i]->first_released ne v0 - && $input_file_objects[$i]->file ne 'DAge.txt' - && $input_file_objects[$i]->file !~ /$EXTRACTED_DIR/) + && lc($input_file_objects[$i]->file) ne 'dage.txt' + && $input_file_objects[$i]->file !~ /$EXTRACTED_DIR/i) { splice @input_file_objects, $i, 0, Input_file->new($file, v0);