# Copyright (c) Index Data 2006-2007
# See the file LICENSE for details.
#
-# $Id: oidtoc.tcl,v 1.3 2007-04-24 12:55:15 adam Exp $
+# $Id: oidtoc.tcl,v 1.5 2007-05-06 20:18:29 adam Exp $
#
# Converts a CSV file with Object identifiers to C
puts $hfile "\#ifndef OID_STD_H"
puts $hfile "\#define OID_STD_H"
- # Define this. So that we don't get duplicate declartions with MSVC
- puts $cfile "\#define OID_STD_H"
puts $cfile "\#include <yaz/oid_db.h>"
puts $cfile ""
# To avoid LNK4049
set lname [string map {- _ . _ { } _ ( {} ) {}} $lname]
set prefix [string tolower [lindex $oid 0]]
- puts -nonewline $cfile "YAZ_EXPORT const int yaz_oid_${prefix}_${lname}\[\] = \{"
+ puts -nonewline $cfile "YAZ_EXPORT extern const int yaz_oid_${prefix}_${lname}\[\] = \{"
puts -nonewline $cfile [string map {. ,} [lindex $oid 1]]
puts $cfile ",-1\};"