Changeset 6454 for trunk/Ohana/src/libautocode/generate
- Timestamp:
- Feb 19, 2006, 5:23:56 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libautocode/generate (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/generate
r5900 r6454 23 23 $TIMEOUT = 0; 24 24 25 &init_key ("DESCRIPTION"); 25 26 &init_key ("TIMEOUT"); 26 &init_key ("NAME");27 27 &init_key ("EXTNAME"); 28 28 &init_key ("STRUCT"); 29 &init_key ("NAME"); 29 30 &init_key ("FILE"); 30 31 &init_key ("SIZE"); … … 43 44 &set_keypair ($key, $value); 44 45 45 # the re are used internally (not just a replacement)46 # these are used internally (not just a replacement) 46 47 if ($key eq "TYPE") { $TYPE = $value; } 47 48 if ($key eq "SIZE") { $SIZE = $value; } … … 83 84 if ($line =~ m|/\*\* STRUCT DEFINITION \*\*/|) { 84 85 &write_structure; 86 } 87 88 # fill in latex table description 89 if ($line =~ m|%%% LATEX TABLE DEFINITION|) { 90 &write_latex; 85 91 } 86 92 … … 141 147 } 142 148 149 } 150 151 sub write_latex { 152 153 for ($i = 0; $i < @field; $i++) { 154 # skip SUBSTRUCT type of entries: 155 if ($mode[$i] eq "SUBSTRUCT") { next; } 156 157 ($type, $Np) = &get_type_array ($format[$i]); 158 159 if ($type eq "e_time") { $type = "unsigned int"; } 160 161 # print STDOUT "$field[$i] .. $type[$i] .. $comment[$i] .. $unit[$i]\n"; 162 163 printf FILE "%-20s & ", "\\code{$field[$i]} "; 164 printf FILE "%-20s & ", "$type"; 165 printf FILE "%-35s & ", "$comment[$i]"; 166 printf FILE "%-20s \\\\ \n", "$unit[$i]"; 167 } 143 168 } 144 169
Note:
See TracChangeset
for help on using the changeset viewer.
