Changeset 10091 for trunk/gsdl/bin/script/gti.pl
- Timestamp:
- 2005-06-14T15:03:04+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/gti.pl
r10050 r10091 777 777 { 778 778 my $text = shift(@_); 779 $text =~ s/\ \/\\\\/g;779 $text =~ s/\&/\&\;/g; 780 780 $text =~ s/</\<\;/g; 781 781 $text =~ s/>/\>\;/g; 782 $text =~ s/\&/\&\;/g;783 782 return $text; 784 783 } … … 963 962 964 963 # Model the new target file on the source file, with the target file translations 965 my $source_file_line = 0;964 my $source_file_line_number = 0; 966 965 foreach my $line_key (sort sort_by_line (keys(%source_file_line_to_key_mapping))) { 967 966 # Fill in the gaps before this chunk starts 968 my $source_file_chunk_starting_line = (split(/-/, $line_key))[0];969 my $source_file_chunk_finishing_line = (split(/-/, $line_key))[1];970 while ($source_file_line < $source_file_chunk_starting_line) {971 print TARGET_FILE @$source_file_lines[$source_file_line ];972 $source_file_line ++;967 my $source_file_chunk_starting_line_number = (split(/-/, $line_key))[0]; 968 my $source_file_chunk_finishing_line_number = (split(/-/, $line_key))[1]; 969 while ($source_file_line_number < $source_file_chunk_starting_line_number) { 970 print TARGET_FILE @$source_file_lines[$source_file_line_number]; 971 $source_file_line_number++; 973 972 } 974 $source_file_line = $source_file_chunk_finishing_line+ 1;973 $source_file_line_number = $source_file_chunk_finishing_line_number + 1; 975 974 976 975 my $chunk_key = $source_file_line_to_key_mapping{$line_key}; … … 988 987 989 988 # Grab the source chunk text 990 my $source_file_chunk = @$source_file_lines[$source_file_chunk_starting_line ];991 for (my $l = ($source_file_chunk_starting_line + 1); $l <= $source_file_chunk_finishing_line; $l++) {989 my $source_file_chunk = @$source_file_lines[$source_file_chunk_starting_line_number]; 990 for (my $l = ($source_file_chunk_starting_line_number + 1); $l <= $source_file_chunk_finishing_line_number; $l++) { 992 991 $source_file_chunk .= @$source_file_lines[$l]; 993 992 } … … 1110 1109 1111 1110 # Model the new target file on the source file, with the target file translations 1112 my $source_file_line = 0;1111 my $source_file_line_number = 0; 1113 1112 foreach my $line_key (sort sort_by_line (keys(%source_file_line_to_key_mapping))) { 1114 1113 # Fill in the gaps before this chunk starts 1115 my $source_file_chunk_starting_line = (split(/-/, $line_key))[0];1116 my $source_file_chunk_finishing_line = (split(/-/, $line_key))[1];1117 while ($source_file_line < $source_file_chunk_starting_line) {1118 print TARGET_FILE @$source_file_lines[$source_file_line ];1119 $source_file_line ++;1114 my $source_file_chunk_starting_line_number = (split(/-/, $line_key))[0]; 1115 my $source_file_chunk_finishing_line_number = (split(/-/, $line_key))[1]; 1116 while ($source_file_line_number < $source_file_chunk_starting_line_number) { 1117 print TARGET_FILE @$source_file_lines[$source_file_line_number]; 1118 $source_file_line_number++; 1120 1119 } 1121 $source_file_line = $source_file_chunk_finishing_line+ 1;1120 $source_file_line_number = $source_file_chunk_finishing_line_number + 1; 1122 1121 1123 1122 my $chunk_key = $source_file_line_to_key_mapping{$line_key};
Note:
See TracChangeset
for help on using the changeset viewer.