For OID class, use oid_class consistently.
+For OIDs use Odr_oid type everywhere, i.e. do not assume Odr_oid=int.
+
+For OID class, use oid_class consistently.
+
Fixed external handling for SUTRS and Explain records (bug appeared in 3.0
series).
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: admin.c,v 1.25 2007-04-16 21:53:08 adam Exp $
+ * $Id: admin.c,v 1.26 2007-05-08 08:22:35 adam Exp $
*/
#include <stdio.h>
Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest );
Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
Z_External *r;
- int *oid;
+ Odr_oid *oid;
Z_ESAdminOriginPartToKeep *toKeep;
Z_ESAdminOriginPartNotToKeep *notToKeep;
printf ("Admin request\n");
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.337 2007-05-06 20:12:19 adam Exp $
+ * $Id: client.c,v 1.338 2007-05-08 08:22:35 adam Exp $
*/
/** \file client.c
* \brief yaz-client program
#define maxOtherInfosSupported 10
struct eoi {
- int oid[OID_SIZE];
+ Odr_oid oid[OID_SIZE];
char* value;
} extraOtherInfos[maxOtherInfosSupported];
}
else if (uif->which == Z_External_single)
{
- const int *oclc_oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_GENERAL,
- "OCLC-userInfo");
Odr_any *sat = uif->u.single_ASN1_type;
- if (!oid_oidcmp(uif->direct_reference, oclc_oid))
+ if (!oid_oidcmp(uif->direct_reference,
+ yaz_oid_userinfo_oclc_userinfo))
{
Z_OCLC_UserInformation *oclc_ui;
ODR decode = odr_createmem(ODR_DECODE);
static void display_record(Z_External *r)
{
- const int *oid = r->direct_reference;
+ const Odr_oid *oid = r->direct_reference;
record_last = r;
/*
*/
if (oid)
{
- int oclass;
+ oid_class oclass;
char oid_name_buf[OID_STR_MAX];
const char *oid_name
= yaz_oid_to_string_buf(oid, &oclass, oid_name_buf);
}
else
{
- const int *oidsuffix = oid_oidlen(oid) > 1
- ? oid + oid_oidlen(oid)-2 : 0;
- if (
-#if AVOID_MARC_DECODE
- /* primitive check for a marc OID 5.1-29 except 16 */
- oidsuffix[0] == 5 && oidsuffix[1] < 30 && oidsuffix[1] != 16
-#else
- 1
-#endif
- )
+ if (oid && yaz_oid_is_iso2709(oid))
{
const char *result;
size_t rlen;
printf("Missing diagset\n");
else
{
- int oclass;
+ oid_class oclass;
char diag_name_buf[OID_STR_MAX];
const char *diag_name = 0;
diag_name = yaz_oid_to_string_buf
{
if (pOid != NULL)
{
- int *pInt = pOid;
+ Odr_oid *pInt = pOid;
print_level(iLevel);
printf("%s:", pTag);
}
else
{
- const int *ill_oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_GENERAL, "ISOILL-1");
r = (Z_External *) odr_malloc (out, sizeof(*r));
- r->direct_reference = odr_oiddup(out, ill_oid);
+ r->direct_reference = odr_oiddup(out, yaz_oid_general_isoill_1);
r->indirect_reference = 0;
r->descriptor = 0;
r->which = Z_External_single;
}
else
{
- const int *ill_oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_GENERAL, "ISOILL-1");
-
ill_request_buf = odr_getbuf (out, &ill_request_size, 0);
r = (Z_External *) odr_malloc (out, sizeof(*r));
- r->direct_reference = odr_oiddup(out, ill_oid);
+ r->direct_reference = odr_oiddup(out, yaz_oid_general_isoill_1);
r->indirect_reference = 0;
r->descriptor = 0;
r->which = Z_External_single;
static Z_External *create_ItemOrderExternal(const char *type, int itemno)
{
Z_External *r = (Z_External *) odr_malloc(out, sizeof(Z_External));
- const int *itemorder_oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_EXTSERV,
- "Item order");
- r->direct_reference = odr_oiddup(out, itemorder_oid);
+ r->direct_reference = odr_oiddup(out, yaz_oid_extserv_item_order);
r->indirect_reference = 0;
r->descriptor = 0;
}
else if (!strcmp(type, "xml") || !strcmp(type, "3"))
{
- const int *oid_xml = yaz_string_to_oid(yaz_oid_std(),
- CLASS_RECSYN, "xml");
const char *xml_buf =
"<itemorder>\n"
" <type>request</type>\n"
" <borrowerTicketNo> 1212 </borrowerTicketNo>\n"
"</itemorder>";
r->u.itemOrder->u.esRequest->notToKeep->itemRequest =
- z_ext_record_oid(out, oid_xml, xml_buf, strlen(xml_buf));
+ z_ext_record_oid(out, yaz_oid_recsyn_xml, xml_buf, strlen(xml_buf));
}
else
r->u.itemOrder->u.esRequest->notToKeep->itemRequest = 0;
Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest);
Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
- const int *itemorder_oid = yaz_string_to_oid(yaz_oid_std(),
- CLASS_EXTSERV,
- "Item order");
req->referenceId = set_refid (out);
- req->packageType = odr_oiddup(out, itemorder_oid);
+ req->packageType = odr_oiddup(out, yaz_oid_extserv_item_order);
req->packageName = esPackageName;
req->taskSpecificParameters = create_ItemOrderExternal(type, itemno);
Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
Z_External *r;
Z_External *record_this = 0;
- const int *oid_xml = yaz_string_to_oid(yaz_oid_std(),
- CLASS_RECSYN, "xml");
-
if (rec_buf)
- record_this = z_ext_record_oid(out, oid_xml, rec_buf, rec_len);
+ record_this = z_ext_record_oid(out, yaz_oid_recsyn_xml,
+ rec_buf, rec_len);
else
{
if (!record_last)
{
char *asn_buf = 0;
int noread = 0;
- int *oid;
+ Odr_oid *oid;
char oid_str[51];
Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest);
Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
};
char oname_str[101], oclass_str[101], oid_str[101];
int i;
- int oidclass = CLASS_GENERAL;
- int oid[OID_SIZE];
+ oid_class oidclass = CLASS_GENERAL;
+ Odr_oid oid[OID_SIZE];
if (sscanf (args, "%100[^ ] %100[^ ] %100s",
oname_str,oclass_str, oid_str) < 1) {
else
{
NMEM oid_tmp = nmem_create();
- const int *oid =
+ const Odr_oid *oid =
yaz_string_to_oid_nmem(yaz_oid_std(),
CLASS_GENERAL, oidstr, oid_tmp);
oid_oidcpy(extraOtherInfos[otherinfoNo].oid, oid);
if (extraOtherInfos[i].value)
{
char name_oid[OID_STR_MAX];
- int oclass;
+ oid_class oclass;
const char *name =
yaz_oid_to_string_buf(extraOtherInfos[i].oid, &oclass,
name_oid);
if (extraOtherInfos[i].value)
{
char name_oid[OID_STR_MAX];
- int oclass;
+ oid_class oclass;
const char *name =
yaz_oid_to_string_buf(extraOtherInfos[i].oid, &oclass,
name_oid);
i, name ? name : "null",
extraOtherInfos[i].value);
}
-
}
}
return 0;
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tabcomplete.c,v 1.18 2007-04-12 13:52:57 adam Exp $
+ * $Id: tabcomplete.c,v 1.19 2007-05-08 08:22:35 adam Exp $
*/
#include <string.h>
of pointers into the oid owned data
*/
-void oid_loader(const int *oid,
- int oclass, const char *name, void* data_)
+void oid_loader(const Odr_oid *oid,
+ oid_class oclass, const char *name, void* data_)
{
oid_callback_t* data=(oid_callback_t*) data_;
-<!-- $Id: tools.xml,v 1.61 2007-05-07 13:18:32 adam Exp $ -->
+<!-- $Id: tools.xml,v 1.62 2007-05-08 08:22:35 adam Exp $ -->
<chapter id="tools"><title>Supporting Tools</title>
<para>
<para>
The basic YAZ representation of an OID is an array of integers,
- terminated with the value -1. There is a <literal>typedef</literal>
- of this integer to <literal>Odr_oid</literal> but this is not consistenly
- used everywhere.
+ terminated with the value -1. This integer is of type
+ <literal>Odr_oid</literal>.
</para>
<para>
- An OID can either be declared as a automatic variable or we can
- allocated using the ODR/NMEM memory utilities. It's
+ Fundamental OID operations and the type <literal>Odr_oid</literal>
+ are defined in <filename>yaz/oid_util.h</filename>.
+ </para>
+ <para>
+ An OID can either be declared as a automatic variable or it can
+ allocated using the memory utilities or ODR/NMEM. It's
guaranteed that an OID can fit in <literal>OID_SIZE</literal> integers.
</para>
<example id="tools.oid.bib1.1"><title>Create OID on stack</title>
<para>
We can create an OID for the Bib-1 attribute set with:
<screen>
- int bib1[OID_SIZE];
- myoid[0] = 1;
- myoid[1] = 2;
- myoid[2] = 840;
- myoid[3] = 10003;
- myoid[4] = 3;
- myoid[5] = 1;
- myoid[6] = -1;
+ Odr_oid bib1[OID_SIZE];
+ bib1[0] = 1;
+ bib1[1] = 2;
+ bib1[2] = 840;
+ bib1[3] = 10003;
+ bib1[4] = 3;
+ bib1[5] = 1;
+ bib1[6] = -1;
</screen>
</para>
</example>
And OID may also be filled from a string-based representation using
dots (.). This is achieved by function
<screen>
- int oid_dotstring_to_oid(const char *name, int *oid);
+ int oid_dotstring_to_oid(const char *name, Odr_oid *oid);
</screen>
+ This functions returns 0 if name could be converted; -1 otherwise.
</para>
<example id="tools.oid.bib1.2"><title>Using oid_oiddotstring_to_oid</title>
<para>
- We can create the Bib-1 attribute set OID easier with:
+ We can fill the Bib-1 attribute set OID easier with:
<screen>
- int bib1[OID_SIZE];
+ Odr_oid bib1[OID_SIZE];
oid_oiddotstring_to_oid("1.2.840.10003.3.1", bib1);
</screen>
</para>
<para>
The function
<screen>
- char *oid_oid_to_dotstring(const int *oid, char *oidbuf)
+ char *oid_oid_to_dotstring(const Odr_oid *oid, char *oidbuf)
</screen>
does the reverse of <function>oid_oiddotstring_to_oid</function>. It
converts an OID to the string-based representation using dots.
<para>
From YAZ version 3 and later, the oident system has been replaced
by an OID database. OID database is a misnomer .. the old odient
- was a database system too.
+ system was also a database.
</para>
<para>
The OID database is really just a map between named Object Identifiers
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: backend.h,v 1.46 2007-05-02 12:37:15 adam Exp $ */
+/* $Id: backend.h,v 1.47 2007-05-08 08:22:35 adam Exp $ */
/**
* \file backend.h
char *setname; /* set name */
int start;
int number; /* record number */
- int *format; /* format, transfer syntax (OID) */
+ Odr_oid *format; /* format, transfer syntax (OID) */
Z_ReferenceId *referenceId;/* reference ID */
Z_RecordComposition *comp; /* Formatting instructions */
ODR stream; /* encoding stream - memory source if required */
char *setname; /* set name */
int number; /* record number */
Z_ReferenceId *referenceId;/* reference ID */
- int *request_format; /* format, transfer syntax (OID) */
+ Odr_oid *request_format; /* format, transfer syntax (OID) */
Z_RecordComposition *comp; /* Formatting instructions */
ODR stream; /* encoding stream - memory source if req */
ODR print; /* printing stream */
int len; /* length of record or -1 if structured */
char *record; /* record */
int last_in_set; /* is it? */
- int *output_format; /* response format/syntax (OID) */
+ Odr_oid *output_format; /* response format/syntax (OID) */
int errcode; /* 0==success */
char *errstring; /* system error string or NULL */
int surrogate_flag; /* surrogate diagnostic */
typedef struct bend_scan_rr {
int num_bases; /* number of elements in databaselist */
char **basenames; /* databases to search */
- int *attributeset;
+ Odr_oid *attributeset;
Z_ReferenceId *referenceId; /* reference ID */
Z_AttributesPlusTerm *term;
ODR stream; /* encoding stream - memory source if required */
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: logrpn.h,v 1.15 2007-04-12 13:52:57 adam Exp $ */
+/* $Id: logrpn.h,v 1.16 2007-05-08 08:22:35 adam Exp $ */
/**
* \file logrpn.h
YAZ_EXPORT void log_rpn_query(Z_RPNQuery *rpn);
YAZ_EXPORT void log_rpn_query_level(int loglevel, Z_RPNQuery *rpn);
-YAZ_EXPORT void log_scan_term(Z_AttributesPlusTerm *zapt, const int *ast);
+YAZ_EXPORT void log_scan_term(Z_AttributesPlusTerm *zapt, const Odr_oid *ast);
YAZ_EXPORT void log_scan_term_level(int loglevel,
Z_AttributesPlusTerm *zapt,
- const int *ast);
+ const Odr_oid *ast);
YAZ_EXPORT void yaz_log_zquery(Z_Query *q);
YAZ_EXPORT void yaz_log_zquery_level(int loglevel, Z_Query *q);
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: odr.h,v 1.27 2007-04-12 13:52:57 adam Exp $ */
+/* $Id: odr.h,v 1.28 2007-05-08 08:22:35 adam Exp $ */
/**
* \file odr.h
#include <yaz/yconfig.h>
#include <yaz/nmem.h>
+/* for definition of Odr_oid */
+#include <yaz/oid_util.h>
+
YAZ_BEGIN_CDECL
#ifndef bool_t
int top;
} Odr_bitmask;
-typedef int Odr_oid; /* terminate by -1 */
-
#define ODR_S_SET 0
#define ODR_S_CUR 1
#define ODR_S_END 2
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: oid_db.h,v 1.7 2007-05-07 12:06:09 adam Exp $ */
+/* $Id: oid_db.h,v 1.8 2007-05-08 08:22:35 adam Exp $ */
/**
* \file oid_db.h
/** \brief OID database */
typedef struct yaz_oid_db *yaz_oid_db_t;
+
+typedef enum oid_class
+{
+ CLASS_NOP=0,
+ CLASS_APPCTX,
+ CLASS_ABSYN,
+ CLASS_ATTSET,
+ CLASS_TRANSYN,
+ CLASS_DIAGSET,
+ CLASS_RECSYN,
+ CLASS_RESFORM,
+ CLASS_ACCFORM,
+ CLASS_EXTSERV,
+ CLASS_USERINFO,
+ CLASS_ELEMSPEC,
+ CLASS_VARSET,
+ CLASS_SCHEMA,
+ CLASS_TAGSET,
+ CLASS_GENERAL,
+ CLASS_NEGOT
+} oid_class;
+
+
/** \brief returns standard OID database
\retval OID database handle
*/
any named OID in dot-notation (1.2.8).
*/
YAZ_EXPORT
-const int *yaz_string_to_oid(yaz_oid_db_t oid_db,
- int oclass, const char *name);
+const Odr_oid *yaz_string_to_oid(yaz_oid_db_t oid_db,
+ oid_class oclass, const char *name);
/** \brief creates NMEM malloc'ed OID from string
\returns raw OID or NULL if name is unknown (bad)
*/
YAZ_EXPORT
-int *yaz_string_to_oid_nmem(yaz_oid_db_t oid_db,
- int oclass, const char *name, NMEM nmem);
+Odr_oid *yaz_string_to_oid_nmem(yaz_oid_db_t oid_db,
+ oid_class oclass, const char *name, NMEM nmem);
/** \brief creates ODR malloc'ed OID from string
\param oid_db OID database
\returns raw OID or NULL if name is unknown (bad)
*/
YAZ_EXPORT
-int *yaz_string_to_oid_odr(yaz_oid_db_t oid_db,
- int oclass, const char *name, ODR odr);
+Odr_oid *yaz_string_to_oid_odr(yaz_oid_db_t oid_db,
+ oid_class oclass, const char *name, ODR odr);
/** \brief maps raw OID to string
\param oid_db OID database
*/
YAZ_EXPORT
const char *yaz_oid_to_string(yaz_oid_db_t oid_db,
- const int *oid, int *oclass);
+ const Odr_oid *oid, oid_class *oclass);
/** \brief maps any OID to string (named or dot-notation)
\returns OID string (named or dot notatition)
*/
YAZ_EXPORT
-const char *yaz_oid_to_string_buf(const int *oid, int *oclass, char *buf);
+const char *yaz_oid_to_string_buf(const Odr_oid *oid,
+ oid_class *oclass, char *buf);
/** \brief traverses OIDs in a database
\param oid_db OID database
\param client_data data to be passed to func (custom defined)
*/
YAZ_EXPORT void yaz_oid_trav(yaz_oid_db_t oid_db,
- void (*func)(const int *oid,
- int oclass, const char *name,
+ void (*func)(const Odr_oid *oid,
+ oid_class oclass, const char *name,
void *client_data),
void *client_data);
\retval 0 OID is not a MARC type
*/
YAZ_EXPORT
-int yaz_oid_is_iso2709(const int *oid);
+int yaz_oid_is_iso2709(const Odr_oid *oid);
/** \brief adds new OID entry to database
\param oid_db database
*/
YAZ_EXPORT
int yaz_oid_add(yaz_oid_db_t oid_db, int oclass, const char *name,
- const int *new_oid);
+ const Odr_oid *new_oid);
/** \brief creates empty OID database
struct yaz_oid_entry {
int oclass;
- const int *oid;
+ const Odr_oid *oid;
char *name;
};
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: oid_util.h,v 1.3 2007-05-07 12:04:06 adam Exp $ */
+/* $Id: oid_util.h,v 1.4 2007-05-08 08:22:35 adam Exp $ */
/**
* \file oid_util.h
#define OID_SIZE 20
#define OID_STR_MAX 256
+typedef short Odr_oid; /* terminate by -1 */
+
typedef enum oid_proto
{
PROTO_NOP=0,
PROTO_HTTP
} oid_proto;
-typedef enum oid_class
-{
- CLASS_NOP=0,
- CLASS_APPCTX,
- CLASS_ABSYN,
- CLASS_ATTSET,
- CLASS_TRANSYN,
- CLASS_DIAGSET,
- CLASS_RECSYN,
- CLASS_RESFORM,
- CLASS_ACCFORM,
- CLASS_EXTSERV,
- CLASS_USERINFO,
- CLASS_ELEMSPEC,
- CLASS_VARSET,
- CLASS_SCHEMA,
- CLASS_TAGSET,
- CLASS_GENERAL,
- CLASS_NEGOT
-} oid_class;
-
-YAZ_EXPORT void oid_oidcpy(int *t, const int *s);
-YAZ_EXPORT void oid_oidcat(int *t, const int *s);
-YAZ_EXPORT int oid_oidcmp(const int *o1, const int *o2);
-YAZ_EXPORT int oid_oidlen(const int *o);
-YAZ_EXPORT char *oid_oid_to_dotstring(const int *oid, char *oidbuf);
-YAZ_EXPORT int oid_dotstring_to_oid(const char *name, int *oid);
+YAZ_EXPORT void oid_oidcpy(Odr_oid *t, const Odr_oid *s);
+YAZ_EXPORT void oid_oidcat(Odr_oid *t, const Odr_oid *s);
+YAZ_EXPORT int oid_oidcmp(const Odr_oid *o1, const Odr_oid *o2);
+YAZ_EXPORT int oid_oidlen(const Odr_oid *o);
+YAZ_EXPORT char *oid_oid_to_dotstring(const Odr_oid *oid, char *oidbuf);
+YAZ_EXPORT int oid_dotstring_to_oid(const char *name, Odr_oid *oid);
YAZ_END_CDECL
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: otherinfo.h,v 1.10 2007-04-12 17:50:26 adam Exp $ */
+/* $Id: otherinfo.h,v 1.11 2007-05-08 08:22:35 adam Exp $ */
/**
* \file otherinfo.h
YAZ_EXPORT
Z_OtherInformationUnit *yaz_oi_update (
Z_OtherInformation **otherInformationP, ODR odr,
- const int *oid, int categoryValue, int delete_flag);
+ const Odr_oid *oid, int categoryValue, int delete_flag);
YAZ_EXPORT
void yaz_oi_set_string_oid (
Z_OtherInformation **otherInformation, ODR odr,
- const int *oid, int categoryValue,
+ const Odr_oid *oid, int categoryValue,
const char *str);
YAZ_EXPORT
char *yaz_oi_get_string_oid (
Z_OtherInformation **otherInformation,
- const int *oid, int categoryValue, int delete_flag);
+ const Odr_oid *oid, int categoryValue, int delete_flag);
YAZ_END_CDECL
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: prt-ext.h,v 1.19 2007-05-04 12:23:54 adam Exp $ */
+/* $Id: prt-ext.h,v 1.20 2007-05-08 08:22:35 adam Exp $ */
/**
* \file prt-ext.h
*/
typedef struct Z_ext_typeent
{
- int oid[OID_SIZE]; /* the direct-reference OID */
+ Odr_oid oid[OID_SIZE]; /* the direct-reference OID */
int what; /* discriminator value for the external CHOICE */
Odr_fun fun; /* decoder function */
} Z_ext_typeent;
/** \brief codec for BER EXTERNAL */
YAZ_EXPORT int z_External(ODR o, Z_External **p, int opt, const char *name);
/** \brief returns type information for OID (NULL if not known) */
-YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(const int *oid);
+YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(const Odr_oid *oid);
/** \brief encodes EXTERNAL record based on OID (NULL if not known) */
-YAZ_EXPORT Z_External *z_ext_record_oid(ODR o, const int *oid,
+YAZ_EXPORT Z_External *z_ext_record_oid(ODR o, const Odr_oid *oid,
const char *buf, int len);
/** \brief encodes EXTERNAL XML record */
YAZ_EXPORT Z_External *z_ext_record_xml(ODR o, const char *buf, int len);
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: querytowrbuf.h,v 1.6 2007-04-12 13:52:57 adam Exp $ */
+/* $Id: querytowrbuf.h,v 1.7 2007-05-08 08:22:35 adam Exp $ */
/**
* \file querytowrbuf.h
* \brief Query to WRBUF (to strings)
YAZ_EXPORT void yaz_query_to_wrbuf(WRBUF b, const Z_Query *q);
YAZ_EXPORT void yaz_scan_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt,
- const int *attribute_set);
+ const Odr_oid *attribute_set);
YAZ_EXPORT void yaz_rpnquery_to_wrbuf(WRBUF b, const Z_RPNQuery *rpn);
YAZ_EXPORT void wrbuf_diags(WRBUF b, int num_diagnostics,Z_DiagRec **diags);
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: retrieval.h,v 1.9 2007-02-08 10:51:23 adam Exp $ */
+/* $Id: retrieval.h,v 1.10 2007-05-08 08:22:35 adam Exp $ */
/**
* \file retrieval.h
#include <stddef.h>
#include <yaz/wrbuf.h>
#include <yaz/yconfig.h>
-
+#include <yaz/oid_util.h>
#include <yaz/record_conv.h>
YAZ_BEGIN_CDECL
*/
YAZ_EXPORT
int yaz_retrieval_request(yaz_retrieval_t p,
- const char *schema, int *syntax,
- const char **match_schema, int **match_syntax,
+ const char *schema, Odr_oid *syntax,
+ const char **match_schema, Odr_oid **match_syntax,
yaz_record_conv_t *rc,
const char **backend_schema,
- int **backend_syntax);
+ Odr_oid **backend_syntax);
/** returns error string (for last error)
\param p record conversion handle
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: grs1disp.c,v 1.7 2007-04-12 13:52:57 adam Exp $
+ * $Id: grs1disp.c,v 1.8 2007-05-08 08:22:36 adam Exp $
*/
/**
}
else if (t->content->which == Z_ElementData_oid)
{
- int *ip = t->content->u.oid;
+ Odr_oid *ip = t->content->u.oid;
if (ip)
{
char oid_name_str[OID_STR_MAX];
- int oclass;
+ oid_class oclass;
const char *oid_name
= yaz_oid_to_string_buf(ip, &oclass, oid_name_str);
* Copyright (C) 1995-2007, Index Data ApS
* All rights reserved.
*
- * $Id: logrpn.c,v 1.17 2007-05-06 20:12:20 adam Exp $
+ * $Id: logrpn.c,v 1.18 2007-05-08 08:22:36 adam Exp $
*/
/**
* zlog_attributes: print attributes of term
*/
static void zlog_attributes(Z_AttributesPlusTerm *t, int depth,
- const int *ast, int loglevel)
+ const Odr_oid *ast, int loglevel)
{
int of, i;
char str[80];
}
static void zlog_structure(Z_RPNStructure *zs, int depth,
- const int *ast, int loglevel)
+ const Odr_oid *ast, int loglevel)
{
if (zs->which == Z_RPNStructure_complex)
{
}
void log_scan_term_level(int loglevel,
- Z_AttributesPlusTerm *zapt, const int *ast)
+ Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
{
int depth = 0;
if (!loglevel)
zlog_attributes(zapt, depth+2, ast, loglevel);
}
-void log_scan_term(Z_AttributesPlusTerm *zapt, const int *ast)
+void log_scan_term(Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
{
log_scan_term_level (YLOG_LOG, zapt, ast);
}
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: odr_oid.c,v 1.10 2007-04-12 13:52:57 adam Exp $
+ * $Id: odr_oid.c,v 1.11 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file odr_oid.c
return 1;
}
if (o->direction == ODR_DECODE)
- *p = (int *)odr_malloc(o, OID_SIZE * sizeof(**p));
+ *p = (Odr_oid *)odr_malloc(o, OID_SIZE * sizeof(**p));
return ber_oidc(o, *p, OID_SIZE);
}
/*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: odr_util.c,v 1.12 2007-04-12 20:47:28 adam Exp $
+ * $Id: odr_util.c,v 1.13 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file odr_util.c
if (!o)
return 0;
- if (!(r = (int *)nmem_malloc(nmem, (oid_oidlen(o) + 1) * sizeof(int))))
+ if (!(r = (Odr_oid *)
+ nmem_malloc(nmem, (oid_oidlen(o) + 1) * sizeof(Odr_oid))))
return 0;
oid_oidcpy(r, o);
return r;
Odr_oid *odr_getoidbystr_nmem(NMEM nmem, const char *str)
{
- int oid[OID_SIZE];
- int *ret;
+ Odr_oid oid[OID_SIZE];
+ Odr_oid *ret;
if (oid_dotstring_to_oid(str, oid))
return 0;
- ret = (int *)nmem_malloc(nmem, sizeof(*ret)*(oid_oidlen(oid) + 1));
+ ret = (Odr_oid *)nmem_malloc(nmem, sizeof(*ret)*(oid_oidlen(oid) + 1));
oid_oidcpy(ret, oid);
return ret;
}
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: oid_db.c,v 1.7 2007-05-06 20:12:20 adam Exp $
+ * $Id: oid_db.c,v 1.8 2007-05-08 08:22:36 adam Exp $
*/
/**
return standard_db;
}
-const int *yaz_string_to_oid(yaz_oid_db_t oid_db,
- int oclass, const char *name)
+const Odr_oid *yaz_string_to_oid(yaz_oid_db_t oid_db,
+ oid_class oclass, const char *name)
{
for (; oid_db; oid_db = oid_db->next)
{
return 0;
}
-int *yaz_string_to_oid_nmem(yaz_oid_db_t oid_list,
- int oclass, const char *name, NMEM nmem)
+Odr_oid *yaz_string_to_oid_nmem(yaz_oid_db_t oid_list,
+ oid_class oclass, const char *name, NMEM nmem)
{
- const int *oid = yaz_string_to_oid(oid_list, oclass, name);
+ const Odr_oid *oid = yaz_string_to_oid(oid_list, oclass, name);
if (oid)
return odr_oiddup_nmem(nmem, oid);
return odr_getoidbystr_nmem(nmem, name);
}
-int *yaz_string_to_oid_odr(yaz_oid_db_t oid_list,
- int oclass, const char *name, ODR o)
+Odr_oid *yaz_string_to_oid_odr(yaz_oid_db_t oid_list,
+ oid_class oclass, const char *name, ODR o)
{
return yaz_string_to_oid_nmem(oid_list, oclass, name, odr_getmem(o));
}
const char *yaz_oid_to_string(yaz_oid_db_t oid_db,
- const int *oid, int *oclass)
+ const Odr_oid *oid, oid_class *oclass)
{
if (!oid)
return 0;
return 0;
}
-const char *yaz_oid_to_string_buf(const int *oid, int *oclass, char *buf)
+const char *yaz_oid_to_string_buf(const Odr_oid *oid, oid_class *oclass, char *buf)
{
const char *p = yaz_oid_to_string(standard_db, oid, oclass);
if (p)
return oid_oid_to_dotstring(oid, buf);
}
-int yaz_oid_is_iso2709(const int *oid)
+int yaz_oid_is_iso2709(const Odr_oid *oid)
{
if (oid_oidlen(oid) == 6 && oid[0] == 1 && oid[1] == 2
&& oid[2] == 840 && oid[3] == 10003 && oid[4] == 5
}
int yaz_oid_add(yaz_oid_db_t oid_db, int oclass, const char *name,
- const int *new_oid)
+ const Odr_oid *new_oid)
{
- const int *oid = yaz_string_to_oid(oid_db, oclass, name);
+ const Odr_oid *oid = yaz_string_to_oid(oid_db, oclass, name);
if (!oid)
{
struct yaz_oid_entry *ent;
- int *alloc_oid;
+ Odr_oid *alloc_oid;
while (oid_db->next)
oid_db = oid_db->next;
oid_db->xmalloced = 1;
oid_db->entries = ent = (struct yaz_oid_entry *) xmalloc(2 * sizeof(*ent));
- alloc_oid = (int *)
+ alloc_oid = (Odr_oid *)
xmalloc(sizeof(*alloc_oid) * (oid_oidlen(new_oid)+1));
oid_oidcpy(alloc_oid, new_oid);
ent[0].oid = alloc_oid;
}
void yaz_oid_trav(yaz_oid_db_t oid_db,
- void (*func)(const int *oid,
- int oclass, const char *name,
+ void (*func)(const Odr_oid *oid,
+ oid_class oclass, const char *name,
void *client_data),
void *client_data)
{
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: oid_util.c,v 1.3 2007-04-13 07:04:42 adam Exp $
+ * $Id: oid_util.c,v 1.4 2007-05-08 08:22:36 adam Exp $
*/
/**
#include <yaz/snprintf.h>
#include <yaz/oid_util.h>
-void oid_oidcpy(int *t, const int *s)
+void oid_oidcpy(Odr_oid *t, const Odr_oid *s)
{
while ((*(t++) = *(s++)) > -1);
}
-void oid_oidcat(int *t, const int *s)
+void oid_oidcat(Odr_oid *t, const Odr_oid *s)
{
while (*t > -1)
t++;
while ((*(t++) = *(s++)) > -1);
}
-int oid_oidcmp(const int *o1, const int *o2)
+int oid_oidcmp(const Odr_oid *o1, const Odr_oid *o2)
{
while (*o1 == *o2 && *o1 > -1)
{
return -1;
}
-int oid_oidlen(const int *o)
+int oid_oidlen(const Odr_oid *o)
{
int len = 0;
}
-char *oid_oid_to_dotstring(const int *oid, char *oidbuf)
+char *oid_oid_to_dotstring(const Odr_oid *oid, char *oidbuf)
{
char tmpbuf[20];
int i;
return oidbuf;
}
-int oid_dotstring_to_oid(const char *name, int *oid)
+int oid_dotstring_to_oid(const char *name, Odr_oid *oid)
{
int i = 0;
int val = 0;
# 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.7 2007-05-08 08:22:36 adam Exp $
#
# Converts a CSV file with Object identifiers to C
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\[\] ="
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: otherinfo.c,v 1.7 2007-04-12 13:52:57 adam Exp $
+ * $Id: otherinfo.c,v 1.8 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file otherinfo.c
Z_OtherInformationUnit *yaz_oi_update (
Z_OtherInformation **otherInformationP, ODR odr,
- const int *oid, int categoryValue, int delete_flag)
+ const Odr_oid *oid, int categoryValue, int delete_flag)
{
int i;
Z_OtherInformation *otherInformation;
{
otherInformation->list[i]->category = (Z_InfoCategory*)
odr_malloc (odr, sizeof(Z_InfoCategory));
- otherInformation->list[i]->category->categoryTypeId = (int*)
+ otherInformation->list[i]->category->categoryTypeId = (Odr_oid*)
odr_oiddup (odr, oid);
- otherInformation->list[i]->category->categoryValue = (int*)
- odr_malloc (odr, sizeof(int));
- *otherInformation->list[i]->category->categoryValue =
- categoryValue;
+ otherInformation->list[i]->category->categoryValue =
+ odr_intdup(odr, categoryValue);
}
else
otherInformation->list[i]->category = 0;
void yaz_oi_set_string_oid (
Z_OtherInformation **otherInformation, ODR odr,
- const int *oid, int categoryValue,
+ const Odr_oid *oid, int categoryValue,
const char *str)
{
Z_OtherInformationUnit *oi =
char *yaz_oi_get_string_oid (
Z_OtherInformation **otherInformation,
- const int *oid, int categoryValue, int delete_flag)
+ const Odr_oid *oid, int categoryValue, int delete_flag)
{
Z_OtherInformationUnit *oi;
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: pquery.c,v 1.11 2007-04-16 21:53:09 adam Exp $
+ * $Id: pquery.c,v 1.12 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file pquery.c
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
int *attr_list, char **attr_clist,
- int **attr_set);
+ Odr_oid **attr_set);
-static int *query_oid_getvalbyname(struct yaz_pqf_parser *li, ODR o)
+static Odr_oid *query_oid_getvalbyname(struct yaz_pqf_parser *li, ODR o)
{
char buf[32];
- if (li->lex_len > 31)
+ if (li->lex_len >= sizeof(buf)-1)
return 0;
memcpy (buf, li->lex_buf, li->lex_len);
buf[li->lex_len] = '\0';
static int p_query_parse_attr(struct yaz_pqf_parser *li, ODR o,
int num_attr, int *attr_list,
- char **attr_clist, int **attr_set)
+ char **attr_clist, Odr_oid **attr_set)
{
const char *cp;
static Z_AttributesPlusTerm *rpn_term(struct yaz_pqf_parser *li, ODR o,
int num_attr, int *attr_list,
- char **attr_clist, int **attr_set)
+ char **attr_clist, Odr_oid **attr_set)
{
Z_AttributesPlusTerm *zapt;
Odr_oct *term_octet;
static Z_Operand *rpn_simple(struct yaz_pqf_parser *li, ODR o,
int num_attr, int *attr_list, char **attr_clist,
- int **attr_set)
+ Odr_oid **attr_set)
{
Z_Operand *zo;
case 't':
zo->which = Z_Operand_APT;
if (!(zo->u.attributesPlusTerm =
- rpn_term (li, o, num_attr, attr_list, attr_clist, attr_set)))
+ rpn_term(li, o, num_attr, attr_list, attr_clist, attr_set)))
return 0;
lex (li);
break;
static Z_Complex *rpn_complex(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
int *attr_list, char **attr_clist,
- int **attr_set)
+ Odr_oid **attr_set)
{
Z_Complex *zc;
Z_Operator *zo;
int num_attr, int max_attr,
int *attr_list,
char **attr_clist,
- int **attr_set)
+ Odr_oid **attr_set)
{
Z_RPNStructure *sz;
Z_RPNQuery *zq;
int attr_array[1024];
char *attr_clist[512];
- int *attr_set[512];
- int *top_set = 0;
+ Odr_oid *attr_set[512];
+ Odr_oid *top_set = 0;
zq = (Z_RPNQuery *)odr_malloc (o, sizeof(*zq));
lex (li);
{
int attr_list[1024];
char *attr_clist[512];
- int *attr_set[512];
+ Odr_oid *attr_set[512];
int num_attr = 0;
int max_attr = 512;
- int *top_set = 0;
+ Odr_oid *top_set = 0;
Z_AttributesPlusTerm *apt;
lex (li);
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: prt-ext.c,v 1.12 2007-05-05 10:26:31 adam Exp $
+ * $Id: prt-ext.c,v 1.13 2007-05-08 08:22:36 adam Exp $
*/
/**
{{-1}, 0, 0}
};
-Z_ext_typeent *z_ext_getentbyref(const int *oid)
+Z_ext_typeent *z_ext_getentbyref(const Odr_oid *oid)
{
Z_ext_typeent *p;
odr_sequence_end(o);
}
-Z_External *z_ext_record_oid(ODR o, const int *oid, const char *buf, int len)
+Z_External *z_ext_record_oid(ODR o, const Odr_oid *oid, const char *buf, int len)
{
Z_External *thisext;
char oid_str_buf[OID_STR_MAX];
const char *oid_str;
- int oclass;
+ oid_class oclass;
if (!oid)
return 0;
* Copyright (C) 1995-2007, Index Data ApS
* All rights reserved.
*
- * $Id: querytowrbuf.c,v 1.10 2007-05-06 20:12:20 adam Exp $
+ * $Id: querytowrbuf.c,v 1.11 2007-05-08 08:22:36 adam Exp $
*/
/** \file querytowrbuf.c
}
void yaz_scan_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt,
- const int *attrbute_set)
+ const Odr_oid *attrbute_set)
{
/* should print attr set here */
wrbuf_printf(b, "RPN ");
* Copyright (C) 2005-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: retrieval.c,v 1.20 2007-05-06 20:12:20 adam Exp $
+ * $Id: retrieval.c,v 1.21 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file retrieval.c
/** \brief schema name , short-hand such as "dc" */
const char *name;
/** \brief record syntax */
- int *syntax;
+ Odr_oid *syntax;
/** \brief backend name */
const char *backend_name;
/** \brief backend syntax */
- int *backend_syntax;
+ Odr_oid *backend_syntax;
/** \brief record conversion */
yaz_record_conv_t record_conv;
}
int yaz_retrieval_request(yaz_retrieval_t p,
- const char *schema, int *syntax,
- const char **match_schema, int **match_syntax,
+ const char *schema, Odr_oid *syntax,
+ const char **match_schema, Odr_oid **match_syntax,
yaz_record_conv_t *rc,
const char **backend_schema,
- int **backend_syntax)
+ Odr_oid **backend_syntax)
{
struct yaz_retrieval_elem *el = p->list;
int syntax_matches = 0;
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.118 2007-05-06 20:12:20 adam Exp $
+ * $Id: seshigh.c,v 1.119 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file seshigh.c
#if YAZ_HAVE_XML2
yaz_record_conv_t rc = 0;
const char *match_schema = 0;
- int *match_syntax = 0;
+ Odr_oid *match_syntax = 0;
if (assoc->server)
{
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.118 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.119 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
int *num, Z_RecordComposition *comp,
int *next, int *pres,
Z_ReferenceId *referenceId,
- int *oid, int *errcode)
+ Odr_oid *oid, int *errcode)
{
int recno, total_length = 0, toget = *num, dumped_records = 0;
Z_Records *records =
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.129 2007-05-06 20:12:20 adam Exp $
+ * $Id: zoom-c.c,v 1.130 2007-05-08 08:22:36 adam Exp $
*/
/**
* \file zoom-c.c
* This wrapper is just for logging failed lookups. It would be nicer
* if it could cause failure when a lookup fails, but that's hard.
*/
-static int *zoom_yaz_str_to_z3950oid(ZOOM_connection c,
+static Odr_oid *zoom_yaz_str_to_z3950oid(ZOOM_connection c,
int oid_class, const char *str) {
- int *res = yaz_string_to_oid_odr(yaz_oid_std(), oid_class, str,
+ Odr_oid *res = yaz_string_to_oid_odr(yaz_oid_std(), oid_class, str,
c->odr_out);
if (res == 0)
yaz_log(YLOG_WARN, "%p OID lookup (%d, '%s') failed",
for (i = 0; i<200; i++)
{
size_t len;
- int *oid;
+ Odr_oid *oid;
Z_OtherInformation **oi;
char buf[80];
const char *val;
odr_prepend(c->odr_out, "ZOOM-C",
ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.129 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.130 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion =
static void response_default_diag(ZOOM_connection c, Z_DefaultDiagFormat *r)
{
- int oclass;
+ oid_class oclass;
char *addinfo = 0;
switch (r->which)
if (diag_rec->which == Z_DiagRec_defaultFormat)
{
Z_DefaultDiagFormat *ddf = diag_rec->u.defaultFormat;
- int oclass;
+ oid_class oclass;
error = *ddf->condition;
switch (ddf->which)
if (!strcmp(type, "render"))
{
Z_External *r = (Z_External *) npr->u.databaseRecord;
- const int *oid = r->direct_reference;
+ const Odr_oid *oid = r->direct_reference;
/* render bibliographic record .. */
if (r->which == Z_External_OPAC)
else if (!strcmp(type, "xml"))
{
Z_External *r = (Z_External *) npr->u.databaseRecord;
- const int *oid = r->direct_reference;
+ const Odr_oid *oid = r->direct_reference;
/* render bibliographic record .. */
if (r->which == Z_External_OPAC)
ZOOM_options_set(scan->options, key, val);
}
-static Z_APDU *create_es_package(ZOOM_package p, const int *oid)
+static Z_APDU *create_es_package(ZOOM_package p, const Odr_oid *oid)
{
const char *str;
Z_APDU *apdu = zget_APDU(p->odr_out, Z_APDU_extendedServicesRequest);
const char *record_buf = ZOOM_options_get(p->options, "record");
const char *syntax_str = ZOOM_options_get(p->options, "syntax");
int action_no = -1;
- int *syntax_oid = 0;
+ Odr_oid *syntax_oid = 0;
if (!syntax_str)
syntax_str = "xml";
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.90 2007-05-02 12:36:35 adam Exp $
+ * $Id: ztest.c,v 1.91 2007-05-08 08:22:37 adam Exp $
*/
/*
if (r->direct_reference)
{
char oid_name_str[OID_STR_MAX];
- int oclass;
+ oid_class oclass;
const char *oid_name =
yaz_oid_to_string_buf(r->direct_reference,
&oclass, oid_name_str);
int ztest_fetch(void *handle, bend_fetch_rr *r)
{
char *cp;
- int oclass;
+ oid_class oclass;
char oid_str_buf[OID_STR_MAX];
const char *oid_str = 0;
- const int *oid = r->request_format;
+ const Odr_oid *oid = r->request_format;
r->last_in_set = 0;
r->basename = "Default";