Index: trunk/Ohana/src/libautocode/generate
===================================================================
--- trunk/Ohana/src/libautocode/generate	(revision 5900)
+++ trunk/Ohana/src/libautocode/generate	(revision 6454)
@@ -23,8 +23,9 @@
     $TIMEOUT = 0;
 
+    &init_key ("DESCRIPTION");
     &init_key ("TIMEOUT");
-    &init_key ("NAME");
     &init_key ("EXTNAME");
     &init_key ("STRUCT");
+    &init_key ("NAME");
     &init_key ("FILE");
     &init_key ("SIZE");
@@ -43,5 +44,5 @@
 	&set_keypair ($key, $value);
 
-	# there are used internally (not just a replacement)
+	# these are used internally (not just a replacement)
 	if ($key eq "TYPE")    { $TYPE = $value;   }
 	if ($key eq "SIZE")    { $SIZE = $value;   }
@@ -83,4 +84,9 @@
 	if ($line =~ m|/\*\* STRUCT DEFINITION \*\*/|) {
 	    &write_structure;
+	}
+
+	# fill in latex table description
+	if ($line =~ m|%%% LATEX TABLE DEFINITION|) {
+	    &write_latex;
 	}
 
@@ -141,4 +147,23 @@
     }
 
+}
+
+sub write_latex {
+
+    for ($i = 0; $i < @field; $i++) {
+	# skip SUBSTRUCT type of entries:
+	if ($mode[$i] eq "SUBSTRUCT") { next; }
+
+	($type, $Np) = &get_type_array ($format[$i]);
+
+	if ($type eq "e_time") 	      { $type = "unsigned int"; }
+
+	# print STDOUT "$field[$i] .. $type[$i] .. $comment[$i] .. $unit[$i]\n";
+
+        printf FILE "%-20s & ",       "\\code{$field[$i]} ";
+	printf FILE "%-20s & ",       "$type";
+	printf FILE "%-35s & ",       "$comment[$i]";
+	printf FILE "%-20s \\\\ \n",  "$unit[$i]";
+    }
 }
 
