OSDN Git Service

Fix message generate script is not work.
authorHirami <tomohisa.hirami@nifty.com>
Sun, 18 Mar 2012 11:53:45 +0000 (20:53 +0900)
committerHirami <tomohisa.hirami@nifty.com>
Sun, 18 Mar 2012 11:53:45 +0000 (20:53 +0900)
It seems to change (Active)Perl's specification.
Now its works on ActivePerl 5.12.4.

Src/MsgRes/CheckGenerateRes.pl
Src/MsgRes/GenDefaultResource.pl

index 267ef2d..80718f1 100644 (file)
@@ -19,18 +19,18 @@ open(RES, $ARGV[0]) || die;
 $line = 1;\r
 while(<RES>) {\r
        chop;\r
-       split(/ /);\r
+       ($key, $value) = split(/        /);\r
 \r
-       if ($listinfo{$_[0]} eq "u") {\r
+       if ($listinfo{$key} eq "u") {\r
                # the ID is exists in list and occures first time.\r
-               $listinfo{$_[0]} = "e";\r
-       } elsif (defined($listinfo{$_[0]})) {\r
-               $listinfo{$_[0]} = "d";\r
+               $listinfo{$key} = "e";\r
+       } elsif (defined($listinfo{$key})) {\r
+               $listinfo{$key} = "d";\r
        } else {\r
                # unknown ID\r
-               $listinfo{$_[0]} = "x";\r
+               $listinfo{$key} = "x";\r
        }\r
-       $msgline{$_[0]} = $_[1];\r
+       $msgline{$key} = $value;\r
        $line++;\r
 }\r
 close(RES);\r
index 138b86d..21cf400 100644 (file)
@@ -43,8 +43,8 @@ open(OUT, ">$cpp") || die;
 open(SRC, $baseres) || die;\r
 while(<SRC>) {\r
        chop;\r
-       split(/\t/);\r
-       $msgpair{$_[0]} = $_[1];\r
+       ($key, $value) = split(/\t/);\r
+       $msgpair{$key} = $value;\r
 }\r
 close(SRC);\r
 \r