Commit MetaInfo

Revisionfcc4d72d31d84d79ba2eadc97f4b68ba38191434 (tree)
Zeit2020-03-14 06:45:24
AutorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

adjust difference of spaces

Ändern Zusammenfassung

Diff

--- a/1line/patch.pl
+++ b/1line/patch.pl
@@ -16,6 +16,8 @@ while(!eof(FI)){
1616 $out = <FI>;
1717 $in2 = $in;
1818 $in2 =~ s/^[\t ]+//;
19+ my $out2 = $out;
20+ $out2 =~ s/^[\t ]+//;
1921 for($i = 0; $i < $#file; $i++){
2022 if($file[$i] eq "#if 0 /*JP*/\n"){
2123 $f = 1;
@@ -31,7 +33,10 @@ while(!eof(FI)){
3133 }
3234
3335 if($in2 eq $file2[$i]){
34- $file[$i] = "/*JP\n$in*/\n$out";
36+ my $origline = $file[$i];
37+ $origline =~ /(^[\t ]+)/;
38+ my $indent = $1;
39+ $file[$i] = "/*JP\n$origline*/\n$indent$out2";
3540 $file2[$i] = '';
3641 last;
3742 }
Show on old repository browser