Index: genlang
===================================================================
RCS file: /cvsroot/rockbox/tools/genlang,v
retrieving revision 1.11
diff -u -r1.11 genlang
--- genlang	31 Jan 2003 09:04:34 -0000	1.11
+++ genlang	30 Mar 2004 15:10:02 -0000
@@ -62,6 +62,7 @@
         $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 @@
                 # 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 @@
 }
 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 <<MOO
     LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */
