binlang and genlang couldn't handle deprecated strings

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4713 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-06-03 08:23:05 +00:00
parent 2adfd88965
commit f84e93edfe
2 changed files with 5 additions and 3 deletions

View file

@ -70,7 +70,7 @@ while(<ENG>) {
if($value =~ s/^\"(.*)\"\s*$/$1/g) {
# Skip voice-only entries
if(!$value && $set{'voice'}) {
if(!$value && $set{'voice'} ne "\"\"") {
$idnum{$set{'id'}} = '_done_';
next;
}

View file

@ -2,7 +2,7 @@
if(!$ARGV[0]) {
print <<MOO
Usage: lang.pl [-p=<prefix>] <language file>
Usage: genlang [-p=<prefix>] <language file>
When running this program. <prefix>.h and <prefix>.c will be created in the
"current directory". <prefix> is "lang" by default.
@ -77,7 +77,9 @@ while(<LANG>) {
$value = $set{'eng'};
}
# print "VOICE: ".$set{'voice'}." VALUE: $value\n";
if(($value eq "\"\"") && $set{'voice'}) {
# Note: if both entries are "", the string is deprecated,
# but must be included to maintain compatibility
if(($value eq "\"\"") && $set{'voice'} ne "\"\"") {
# voice-only
push @vfile, $set{'id'};
}