From f9495cba65c108ac99759cf3a0b978c0a58c9233 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Sat, 3 Apr 2004 20:52:24 +0000 Subject: Changed concept for voice IDs: the voice-only IDs now are in a separate range, don't generate an empty language string. This saves memory, but requires a new voice file format with 2 tables. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4463 a1c6a512-1295-4272-9138-f99709370657 --- tools/genlang | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'tools/genlang') diff --git a/tools/genlang b/tools/genlang index de9dd43920..fd0b498813 100755 --- a/tools/genlang +++ b/tools/genlang @@ -62,6 +62,7 @@ while() { $set{$var} = $value; if( (($var eq "new") && $value && ($value !~ /^\"(.*)\"\W*$/)) || + (($var eq "voice") && $value && ($value !~ /^\"(.*)\"\W*$/)) || (($var eq "eng") && ($value !~ /^\"(.*)\"\W*$/)) ) { print "$input:$line:missing quotes for ".$set{'id'}."\n"; $errors++; @@ -75,9 +76,15 @@ while() { # if not set, get the english version $value = $set{'eng'}; } - - print HFILE " ".$set{'id'}.",\n"; - print CFILE " $value,\n"; +# print "VOICE: ".$set{'voice'}." VALUE: $value\n"; + if(($value eq "\"\"") && $set{'voice'}) { + # voice-only + push @vfile, $set{'id'}; + } + else { + push @hfile, $set{'id'}; + print CFILE " $value,\n"; + } undef %set; } @@ -87,6 +94,16 @@ while() { } close(LANG); +for(@hfile) { + print HFILE " $_,\n"; +} + +print HFILE " /* --- below this follows voice-only strings --- */\n", + " VOICEONLY_DELIMITER = 0x8000,\n"; + +for(@vfile) { + print HFILE " $_,\n"; +} print HFILE <