# Copyright (c) Index Data 2006-2007
# See the file LICENSE for details.
#
-# $Id: oidtoc.tcl,v 1.6 2007-05-07 13:18:32 adam Exp $
+# $Id: oidtoc.tcl,v 1.8 2007-05-31 12:14:02 adam Exp $
#
# Converts a CSV file with Object identifiers to C
set xfile [open "${xname}" w]
puts $xfile "<!-- Generated by oidtoc.tcl from $input -->"
- puts $xfile {<table id="standard-oids">}
- puts $xfile {<title>Standard Object Identifiers</title>}
- puts $xfile {<tgroup cols="4">}
+ puts $xfile {<informaltable id="standard-oids">}
+ puts $xfile {<tgroup cols="3">}
puts $xfile {<colspec colwidth="3*" colname="name"></colspec>}
puts $xfile {<colspec colwidth="2*" colname="class"></colspec>}
- puts $xfile {<colspec colwidth="4*" colspec="constant"></colspec>}
- puts $xfile {<colspec colwidth="5*" colname="oid"></colspec>}
+ puts $xfile {<colspec colwidth="4*" colname="oid"></colspec>}
puts $xfile {<thead>}
puts $xfile {<row>}
puts $xfile {<entry>Name</entry>}
puts $xfile {<entry>Class</entry>}
- puts $xfile {<entry>Constant</entry>}
- puts $xfile {<entry>OID</entry>}
+ puts $xfile {<entry>Constant / OID</entry>}
puts $xfile {</row>}
puts $xfile {</thead>}
puts $xfile {<tbody>}
foreach oid $oids {
puts $xfile {<row>}
- puts $xfile {<entry>}
+ puts $xfile {<entry morerows="1">}
puts $xfile [lindex $oid 2]
puts $xfile {</entry>}
- puts $xfile {<entry>}
+ puts $xfile {<entry morerows="1">}
puts $xfile [lindex $oid 0]
puts $xfile {</entry>}
puts $xfile $v
puts $xfile {</literal></entry>}
- puts $xfile {<entry>}
+
+ puts $xfile {</row>}
+ puts $xfile {<row>}
+
+ puts $xfile {<entry namest="oid">}
puts $xfile [lindex $oid 1]
puts $xfile {</entry>}
puts $xfile {</tbody>}
puts $xfile {</tgroup>}
- puts $xfile {</table>}
+ puts $xfile {</informaltable>}
close $xfile
}
set v [constant_var $oid]
- puts -nonewline $cfile "YAZ_EXPORT const int $v\[\] = \{"
+ puts -nonewline $cfile "YAZ_EXPORT const Odr_oid $v\[\] = \{"
puts -nonewline $cfile [string map {. ,} [lindex $oid 1]]
puts $cfile ",-1\};"
- puts $hfile "OID_EXPORT extern const int $v\[\];"
+ puts $hfile "OID_EXPORT extern const Odr_oid $v\[\];"
}
puts $cfile "YAZ_EXPORT struct yaz_oid_entry yaz_oid_standard_entries\[\] ="