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 11:34:00 -0000
@@ -20,6 +20,7 @@
 
 open(HFILE, ">$prefix.h");
 open(CFILE, ">$prefix.c");
+open(VFILE, ">${prefix}-voice.h");
 
 print HFILE <<MOO
 /* This file was automaticly generated using genlang */
@@ -46,6 +47,13 @@
 MOO
     ;
 
+print VFILE <<MOO
+/* This file was automaticly generated using genlang.
+   The enum below contains all available voice strings */
+enum {
+MOO
+    ;
+
 open(LANG, "<$input");
 while(<LANG>) {
     $line++;
@@ -75,9 +83,13 @@
                 # if not set, get the english version
                 $value = $set{'eng'};
             }
-
-            print HFILE "    ".$set{'id'}.",\n";
-            print CFILE "    $value,\n";
+            if($set{'desc'} !~ /spoken only/i) {
+                print HFILE "    ".$set{'id'}.",\n";
+                print CFILE "    $value,\n";
+            }
+            else {
+                print VFILE "    ".$set{'id'}.",\n";
+            }
 
             undef %set;
         }
@@ -95,6 +107,13 @@
 MOO
     ;
 
+print VFILE <<MOO
+    VOICE_LAST_INDEX_IN_ARRAY /* this is not a voice, this is a marker */
+};
+/* end of generated enum list */
+MOO
+    ;
+
 print CFILE <<MOO
 };
 /* end of generated string list */
@@ -103,5 +122,6 @@
 
 close(CFILE);
 close(HFILE);
+close(VFILE);
 
 exit $errors;
