From: Adam Dickmeiss Date: Tue, 8 May 2007 12:50:03 +0000 (+0000) Subject: Use Odr_oid for OIDs. Require YAZ 3.0.2 or later. X-Git-Tag: ZEBRA.2.0.14~8 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=53f50a1b1dd002ef484a41f50f3598386335cae1 Use Odr_oid for OIDs. Require YAZ 3.0.2 or later. --- diff --git a/configure.ac b/configure.ac index 567e143..e2c2160 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Zebra, Index Data ApS, 1995-2007 -dnl $Id: configure.ac,v 1.55 2007-05-03 07:20:19 adam Exp $ +dnl $Id: configure.ac,v 1.56 2007-05-08 12:50:03 adam Exp $ dnl AC_PREREQ(2.59) AC_INIT([idzebra],[2.0.13],[zebra-help@indexdata.dk]) @@ -33,7 +33,7 @@ if test "$ac_cv_lib_crypt_crypt" = "yes"; then fi dnl dnl ------ YAZ -YAZ_INIT([server],3.0.0) +YAZ_INIT([server],[3.0.2]) if test "$YAZVERSION" = "NONE"; then AC_MSG_ERROR([YAZ development libraries required]) fi diff --git a/data1/d1_absyn.c b/data1/d1_absyn.c index 2f03b0c..15892ef 100644 --- a/data1/d1_absyn.c +++ b/data1/d1_absyn.c @@ -1,4 +1,4 @@ -/* $Id: d1_absyn.c,v 1.35 2007-04-16 08:44:31 adam Exp $ +/* $Id: d1_absyn.c,v 1.36 2007-05-08 12:50:03 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -250,7 +250,7 @@ data1_attset *data1_attset_search_name (data1_handle dh, const char *name) return 0; } -data1_attset *data1_attset_search_id(data1_handle dh, const int *oid) +data1_attset *data1_attset_search_id(data1_handle dh, const Odr_oid *oid) { data1_attset_cache p = *data1_attset_cache_get (dh); diff --git a/data1/d1_doespec.c b/data1/d1_doespec.c index 30345d5..2069c44 100644 --- a/data1/d1_doespec.c +++ b/data1/d1_doespec.c @@ -1,4 +1,4 @@ -/* $Id: d1_doespec.c,v 1.14 2007-04-16 21:54:37 adam Exp $ +/* $Id: d1_doespec.c,v 1.15 2007-05-08 12:50:03 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -50,14 +50,14 @@ static int match_children_wildpath(data1_handle dh, data1_node *n, * set is the set to look for, universal set is the set that applies to a * triple with an unknown set. */ -static Z_Triple *find_triple(Z_Variant *var, const int *universal_oid, - const int *var_oid, int zclass, int type) +static Z_Triple *find_triple(Z_Variant *var, const Odr_oid *universal_oid, + const Odr_oid *var_oid, int zclass, int type) { int i; for (i = 0; i < var->num_triples; i++) { - const int *cur_oid = var->triples[i]->variantSetId; + const Odr_oid *cur_oid = var->triples[i]->variantSetId; if (!cur_oid) cur_oid = var->globalVariantSetId; if (cur_oid && var_oid @@ -107,8 +107,8 @@ static void mark_subtree(data1_node *n, int make_variantlist, int no_data, static void match_triple(data1_handle dh, Z_Variant *vreq, - const int *def_oid, - const int *var_oid, data1_node *n) + const Odr_oid *def_oid, + const Odr_oid *var_oid, data1_node *n) { data1_node **c; @@ -283,7 +283,7 @@ static int match_children_here (data1_handle dh, data1_node *n, Z_Variant *vreq = e->elements[i]->u.simpleElement->variantRequest; - const int *var_oid = yaz_oid_varset_variant_1; + const Odr_oid *var_oid = yaz_oid_varset_variant_1; if (!vreq) vreq = e->defaultVariantRequest; diff --git a/data1/d1_expout.c b/data1/d1_expout.c index 3757f28..416465b 100644 --- a/data1/d1_expout.c +++ b/data1/d1_expout.c @@ -1,4 +1,4 @@ -/* $Id: d1_expout.c,v 1.10 2007-04-16 08:44:31 adam Exp $ +/* $Id: d1_expout.c,v 1.11 2007-05-08 12:50:03 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -187,7 +187,7 @@ Odr_oid **f_oid_seq (ExpHandle *eh, data1_node *n, int *num, oid_class oclass) ++(*num); if (!*num) return NULL; - res = (int **)odr_malloc (eh->o, sizeof(*res) * (*num)); + res = (Odr_oid **)odr_malloc (eh->o, sizeof(*res) * (*num)); for (c = n->child, i = 0 ; c; c = c->next) if (is_numeric_tag (eh, c) == 1000) res[i++] = f_oid (eh, c, oclass); diff --git a/debian/control b/debian/control index 1a55d89..f60ae22 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Adam Dickmeiss Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.6.0 -Build-Depends: libyaz3-dev (>= 3.0.0), libexpat1-dev, tcl8.4-dev, libbz2-dev, libxslt1-dev +Build-Depends: libyaz3-dev (>= 3.0.2), libexpat1-dev, tcl8.4-dev, libbz2-dev, libxslt1-dev Package: idzebra-2.0 Section: text diff --git a/include/attrfind.h b/include/attrfind.h index daaa278..db1c04b 100644 --- a/include/attrfind.h +++ b/include/attrfind.h @@ -1,4 +1,4 @@ -/* $Id: attrfind.h,v 1.4 2007-04-16 08:44:31 adam Exp $ +/* $Id: attrfind.h,v 1.5 2007-05-08 12:50:03 adam Exp $ Copyright (C) 2005-2007 Index Data ApS @@ -40,9 +40,9 @@ void attr_init_APT(AttrType *src, Z_AttributesPlusTerm *zapt, int type); void attr_init_AttrList(AttrType *src, Z_AttributeList *list, int type); -int attr_find_ex(AttrType *src, const int **attribute_set_oid, +int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, const char **string_value); -int attr_find(AttrType *src, const int **attribute_set_oid); +int attr_find(AttrType *src, const Odr_oid **attribute_set_oid); YAZ_END_CDECL diff --git a/include/d1_absyn.h b/include/d1_absyn.h index f144773..83e9f5b 100644 --- a/include/d1_absyn.h +++ b/include/d1_absyn.h @@ -1,4 +1,4 @@ -/* $Id: d1_absyn.h,v 1.12 2007-04-16 08:44:31 adam Exp $ +/* $Id: d1_absyn.h,v 1.13 2007-05-08 12:50:03 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -50,7 +50,7 @@ typedef struct data1_xpelement struct data1_absyn { char *name; - int *oid; + Odr_oid *oid; data1_tagset *tagset; data1_varset *varset; data1_esetname *esetnames; diff --git a/include/idzebra/api.h b/include/idzebra/api.h index 76690ae..c8bcad8 100644 --- a/include/idzebra/api.h +++ b/include/idzebra/api.h @@ -1,4 +1,4 @@ -/* $Id: api.h,v 1.48 2007-04-16 08:44:31 adam Exp $ +/* $Id: api.h,v 1.49 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -55,7 +55,7 @@ typedef struct { int position; /* position of record in result set (1,2,..) */ char *buf; /* record buffer (void pointer really) */ int len; /* length */ - const int *format; /* record syntax */ + const Odr_oid *format; /* record syntax */ char *base; zint sysno; int score; @@ -220,7 +220,7 @@ YAZ_EXPORT ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream, const char *setname, Z_RecordComposition *comp, - const int *input_format, + const Odr_oid *input_format, int num_recs, ZebraRetrievalRecord *recs); /** \brief Deletes one or more resultsets @@ -287,7 +287,7 @@ ZEBRA_RES zebra_result_set_term_info(ZebraHandle zh, const char *setname, */ YAZ_EXPORT ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - const int *attributeset, + const Odr_oid *attributeset, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, diff --git a/include/idzebra/data1.h b/include/idzebra/data1.h index b12d795..dfd76c5 100644 --- a/include/idzebra/data1.h +++ b/include/idzebra/data1.h @@ -1,4 +1,4 @@ -/* $Id: data1.h,v 1.22 2007-04-16 08:44:31 adam Exp $ +/* $Id: data1.h,v 1.23 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -71,7 +71,7 @@ struct data1_attset_child { struct data1_attset { char *name; /* symbolic name */ - int *oid; /* attribute set OID */ + Odr_oid *oid; /* attribute set OID */ data1_att *atts; /* attributes */ data1_attset_child *children; /* included attset */ data1_attset *next; /* next in cache */ @@ -111,7 +111,7 @@ typedef struct data1_mapunit typedef struct data1_maptab { char *name; - int *oid; /* target abstract syntax */ + Odr_oid *oid; /* target abstract syntax */ char *target_absyn_name; data1_mapunit *map; struct data1_maptab *next; @@ -145,7 +145,7 @@ typedef enum data1_datatype typedef struct data1_marctab { char *name; - int *oid; /* MARC OID */ + Odr_oid *oid; /* MARC OID */ char record_status[2]; char implementation_codes[5]; @@ -196,7 +196,7 @@ typedef struct data1_varclass typedef struct data1_varset { char *name; - int *oid; /* variant OID */ + Odr_oid *oid; /* variant OID */ data1_varclass *classes; } data1_varset; @@ -229,7 +229,7 @@ struct data1_tagset { int type; /* type of tagset in current context */ char *name; /* symbolic name */ - int *oid; /* variant OID */ + Odr_oid *oid; /* variant OID */ data1_tag *tags; /* tags defined by this set */ data1_tagset *children; /* children */ data1_tagset *next; /* sibling */ @@ -542,7 +542,7 @@ YAZ_EXPORT void data1_absyn_trav (data1_handle dh, void *handle, void *h, data1_absyn *a)); YAZ_EXPORT data1_attset *data1_attset_search_id (data1_handle dh, - const int *oid); + const Odr_oid *oid); YAZ_EXPORT char *data1_getNodeValue(data1_node* node, char* pTagPath); YAZ_EXPORT data1_node *data1_LookupNode(data1_node* node, char* pTagPath); diff --git a/include/idzebra/recctrl.h b/include/idzebra/recctrl.h index 097af09..c7c92cc 100644 --- a/include/idzebra/recctrl.h +++ b/include/idzebra/recctrl.h @@ -1,4 +1,4 @@ -/* $Id: recctrl.h,v 1.34 2007-04-16 08:44:31 adam Exp $ +/* $Id: recctrl.h,v 1.35 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -115,7 +115,7 @@ struct recRetrieveCtrl { /* Input parameters ... */ Res res; /* Resource pool */ ODR odr; /* ODR used to create response */ - const int*input_format; /* Preferred record syntax OID */ + const Odr_oid * input_format; /* Preferred record syntax OID */ Z_RecordComposition *comp; /* formatting instructions */ char *encoding; /* preferred character encoding */ zint localno; /* local id of record */ @@ -128,7 +128,7 @@ struct recRetrieveCtrl { zebra_snippets *doc_snippet; /* response */ - const int *output_format; /* output format OID */ + const Odr_oid * output_format; /* output format OID */ void * rec_buf; int rec_len; int diagnostic; diff --git a/index/attribute.c b/index/attribute.c index e37e3a0..4272aab 100644 --- a/index/attribute.c +++ b/index/attribute.c @@ -1,4 +1,4 @@ -/* $Id: attribute.c,v 1.30 2007-04-16 21:54:37 adam Exp $ +/* $Id: attribute.c,v 1.31 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -46,7 +46,7 @@ static data1_att *getatt(data1_attset *p, int att) return 0; } -static int att_getentbyatt(ZebraHandle zi, const int *set, int att, +static int att_getentbyatt(ZebraHandle zi, const Odr_oid *set, int att, const char **name) { data1_att *r; @@ -70,7 +70,7 @@ ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, int index_type, - const int *curAttributeSet, + const Odr_oid *curAttributeSet, int *ord) { int use_value = -1; @@ -124,7 +124,7 @@ ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, int index_type, const char *xpath_use, - const int *curAttributeSet, + const Odr_oid *curAttributeSet, int *ord) { ZEBRA_RES res = ZEBRA_OK; diff --git a/index/extract.c b/index/extract.c index 68c8b12..85f91bd 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $Id: extract.c,v 1.256 2007-04-25 08:22:01 adam Exp $ +/* $Id: extract.c,v 1.257 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -553,6 +553,20 @@ ZEBRA_RES zebra_extract_records_stream(ZebraHandle zh, } +static WRBUF wrbuf_hex_str(const char *cstr) +{ + size_t i; + WRBUF w = wrbuf_alloc(); + for (i = 0; cstr[i]; i++) + { + if (cstr[i] < ' ' || cstr[i] > 126) + wrbuf_printf(w, "\\%02X", cstr[i] & 0xff); + else + wrbuf_putc(w, cstr[i]); + } + return w; +} + ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, struct ZebraRecStream *stream, enum zebra_recctrl_action_t action, @@ -688,12 +702,20 @@ ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, int db_ord = zebraExplain_get_database_ord(zh->reg->zei); char *rinfo = dict_lookup_ord(zh->reg->matchDict, db_ord, matchStr); + + + if (1) + { + WRBUF w = wrbuf_hex_str(matchStr); + yaz_log(YLOG_LOG, "matchStr: %s", wrbuf_cstr(w)); + wrbuf_destroy(w); + } if (rinfo) { assert(*rinfo == sizeof(*sysno)); memcpy (sysno, rinfo+1, sizeof(*sysno)); } - } + } } if (zebra_rec_keys_empty(zh->reg->keys)) { diff --git a/index/index.h b/index/index.h index 07392a1..1f6e466 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.197 2007-04-16 08:44:31 adam Exp $ +/* $Id: index.h,v 1.198 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -261,7 +261,7 @@ void zebra_limit_for_rset(struct zebra_limit *zl, struct rset_key_control *zebra_key_control_create(ZebraHandle zh); ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, @@ -271,7 +271,7 @@ ZEBRA_RES rpn_get_top_approx_limit(ZebraHandle zh, Z_RPNStructure *zs, zint *approx_limit); ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - const int *attributeset, + const Odr_oid *attributeset, int num_bases, char **basenames, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, RSET limit_set); @@ -309,8 +309,8 @@ void resultSetInvalidate(ZebraHandle zh); int zebra_record_fetch(ZebraHandle zh, zint sysno, int score, zebra_snippets *hit_snippet, ODR stream, - const int *input_format, Z_RecordComposition *comp, - const int **output_format, char **rec_bufp, + const Odr_oid *input_format, Z_RecordComposition *comp, + const Odr_oid **output_format, char **rec_bufp, int *rec_lenp, char **basenamep, char **addinfo); @@ -379,14 +379,14 @@ ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, int index_type, const char *xpath_use, - const int *curAttributeSet, + const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, int index_type, - const int *curAttributeSet, + const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, diff --git a/index/recgrs.c b/index/recgrs.c index cb99ff3..c62d1a9 100644 --- a/index/recgrs.c +++ b/index/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.18 2007-04-16 21:54:37 adam Exp $ +/* $Id: recgrs.c,v 1.19 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -1079,7 +1079,7 @@ int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p, struct grs_read_info gri; const char *tagname; - const int *requested_schema = 0; + const Odr_oid *requested_schema = 0; data1_marctab *marctab; int dummy; diff --git a/index/retrieve.c b/index/retrieve.c index bcb1556..f166dc2 100644 --- a/index/retrieve.c +++ b/index/retrieve.c @@ -1,4 +1,4 @@ -/* $Id: retrieve.c,v 1.69 2007-04-16 21:54:37 adam Exp $ +/* $Id: retrieve.c,v 1.70 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -121,8 +121,8 @@ static int parse_zebra_elem(const char *elem, int zebra_special_sort_fetch(ZebraHandle zh, zint sysno, ODR odr, const char *elemsetname, - const int *input_format, - const int **output_format, + const Odr_oid *input_format, + const Odr_oid **output_format, char **rec_bufp, int *rec_lenp) { const char *retrieval_index; @@ -217,8 +217,8 @@ int zebra_special_sort_fetch(ZebraHandle zh, zint sysno, ODR odr, int zebra_special_index_fetch(ZebraHandle zh, zint sysno, ODR odr, Record rec, const char *elemsetname, - const int *input_format, - const int **output_format, + const Odr_oid *input_format, + const Odr_oid **output_format, char **rec_bufp, int *rec_lenp) { const char *retrieval_index; @@ -401,8 +401,8 @@ static void retrieve_puts_int(WRBUF wrbuf, const char *name, int zebra_special_fetch(ZebraHandle zh, zint sysno, int score, ODR odr, const char *elemsetname, - const int *input_format, - const int **output_format, + const Odr_oid *input_format, + const Odr_oid **output_format, char **rec_bufp, int *rec_lenp) { Record rec; @@ -560,8 +560,8 @@ int zebra_special_fetch(ZebraHandle zh, zint sysno, int score, ODR odr, int zebra_record_fetch(ZebraHandle zh, zint sysno, int score, zebra_snippets *hit_snippet, ODR odr, - const int *input_format, Z_RecordComposition *comp, - const int **output_format, + const Odr_oid *input_format, Z_RecordComposition *comp, + const Odr_oid **output_format, char **rec_bufp, int *rec_lenp, char **basenamep, char **addinfo) { diff --git a/index/rpnscan.c b/index/rpnscan.c index fe0be94..8ea6850 100644 --- a/index/rpnscan.c +++ b/index/rpnscan.c @@ -1,4 +1,4 @@ -/* $Id: rpnscan.c,v 1.8 2007-04-16 21:54:37 adam Exp $ +/* $Id: rpnscan.c,v 1.9 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -377,7 +377,7 @@ struct scan_info { }; ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - const int *attributeset, + const Odr_oid *attributeset, int num_bases, char **basenames, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, RSET limit_set) diff --git a/index/rpnsearch.c b/index/rpnsearch.c index 28a6670..5e1b7e2 100644 --- a/index/rpnsearch.c +++ b/index/rpnsearch.c @@ -1,4 +1,4 @@ -/* $Id: rpnsearch.c,v 1.11 2007-04-16 08:44:32 adam Exp $ +/* $Id: rpnsearch.c,v 1.12 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -703,7 +703,7 @@ void string_rel_add_char(char **term_p, const char *src, int *indx) */ static int string_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, char *term_dict, - const int *attributeSet, + const Odr_oid *attributeSet, int reg_type, int space_split, char *term_dst, int *error_code) { @@ -897,7 +897,7 @@ static int string_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, static ZEBRA_RES string_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, int reg_type, int complete_flag, int num_bases, char **basenames, @@ -955,7 +955,7 @@ static ZEBRA_RES term_limits_APT(ZebraHandle zh, static ZEBRA_RES term_trunc(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, int reg_type, int complete_flag, int num_bases, char **basenames, @@ -995,7 +995,7 @@ static ZEBRA_RES term_trunc(ZebraHandle zh, static ZEBRA_RES string_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, int reg_type, int complete_flag, int num_bases, char **basenames, @@ -1288,7 +1288,7 @@ static ZEBRA_RES grep_info_prepare(ZebraHandle zh, static ZEBRA_RES term_list_trunc(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, int reg_type, int complete_flag, const char *rank_type, @@ -1350,7 +1350,7 @@ static ZEBRA_RES term_list_trunc(ZebraHandle zh, static ZEBRA_RES rpn_search_APT_position(ZebraHandle zh, Z_AttributesPlusTerm *zapt, - const int *attributeSet, + const Odr_oid *attributeSet, int reg_type, int num_bases, char **basenames, NMEM rset_nmem, @@ -1442,7 +1442,7 @@ static ZEBRA_RES rpn_search_APT_position(ZebraHandle zh, static ZEBRA_RES rpn_search_APT_phrase(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, int reg_type, int complete_flag, const char *rank_type, @@ -1502,7 +1502,7 @@ static ZEBRA_RES rpn_search_APT_phrase(ZebraHandle zh, static ZEBRA_RES rpn_search_APT_or_list(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, int reg_type, int complete_flag, const char *rank_type, @@ -1569,7 +1569,7 @@ static ZEBRA_RES rpn_search_APT_or_list(ZebraHandle zh, static ZEBRA_RES rpn_search_APT_and_list(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, int reg_type, int complete_flag, const char *rank_type, @@ -1638,7 +1638,7 @@ static ZEBRA_RES rpn_search_APT_and_list(ZebraHandle zh, static int numeric_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, char *term_dict, - const int *attributeSet, + const Odr_oid *attributeSet, struct grep_info *grep_info, int *max_pos, int reg_type, @@ -1723,7 +1723,7 @@ static int numeric_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, static ZEBRA_RES numeric_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, int reg_type, int complete_flag, int num_bases, char **basenames, @@ -1800,7 +1800,7 @@ static ZEBRA_RES numeric_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, static ZEBRA_RES rpn_search_APT_numeric(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, int reg_type, int complete_flag, const char *rank_type, @@ -1880,7 +1880,7 @@ static ZEBRA_RES rpn_search_APT_numeric(ZebraHandle zh, static ZEBRA_RES rpn_search_APT_local(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, const char *rank_type, NMEM rset_nmem, RSET *rset, @@ -1919,7 +1919,7 @@ static ZEBRA_RES rpn_search_APT_local(ZebraHandle zh, } static ZEBRA_RES rpn_sort_spec(ZebraHandle zh, Z_AttributesPlusTerm *zapt, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, Z_SortKeySpecList *sort_sequence, const char *rank_type, NMEM rset_nmem, @@ -1989,11 +1989,11 @@ static ZEBRA_RES rpn_sort_spec(ZebraHandle zh, Z_AttributesPlusTerm *zapt, static int rpn_check_xpath(ZebraHandle zh, Z_AttributesPlusTerm *zapt, - const int *attributeSet, + const Odr_oid *attributeSet, struct xpath_location_step *xpath, int max, NMEM mem) { - const int *curAttributeSet = attributeSet; + const Odr_oid *curAttributeSet = attributeSet; AttrType use; const char *use_string = 0; @@ -2213,7 +2213,7 @@ ZEBRA_RES rpn_search_xpath(ZebraHandle zh, #define MAX_XPATH_STEPS 10 static ZEBRA_RES rpn_search_APT(ZebraHandle zh, Z_AttributesPlusTerm *zapt, - const int *attributeSet, NMEM stream, + const Odr_oid *attributeSet, NMEM stream, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, NMEM rset_nmem, @@ -2338,7 +2338,7 @@ static ZEBRA_RES rpn_search_APT(ZebraHandle zh, Z_AttributesPlusTerm *zapt, } static ZEBRA_RES rpn_search_structure(ZebraHandle zh, Z_RPNStructure *zs, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, @@ -2378,7 +2378,7 @@ ZEBRA_RES rpn_get_top_approx_limit(ZebraHandle zh, Z_RPNStructure *zs, } ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, @@ -2415,7 +2415,7 @@ ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, } ZEBRA_RES rpn_search_structure(ZebraHandle zh, Z_RPNStructure *zs, - const int *attributeSet, + const Odr_oid *attributeSet, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, char **basenames, diff --git a/index/zebraapi.c b/index/zebraapi.c index ed5fd81..d17444e 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.254 2007-04-16 21:54:37 adam Exp $ +/* $Id: zebraapi.c,v 1.255 2007-05-08 12:50:04 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -1076,7 +1076,7 @@ ZEBRA_RES zebra_search_RPN(ZebraHandle zh, ODR o, Z_RPNQuery *query, ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream, const char *setname, Z_RecordComposition *comp, - const int *input_format, int num_recs, + const Odr_oid *input_format, int num_recs, ZebraRetrievalRecord *recs) { ZebraMetaRecord *poset; @@ -1189,7 +1189,7 @@ ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query, { YAZ_PQF_Parser pqf_parser = yaz_pqf_create (); Z_AttributesPlusTerm *zapt; - int *attributeSet; + Odr_oid *attributeSet; ZEBRA_RES res; if (!(zapt = yaz_pqf_scan(pqf_parser, stream, &attributeSet, query))) @@ -1208,7 +1208,7 @@ ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query, } ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - const int *attributeset, + const Odr_oid *attributeset, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, diff --git a/test/api/t16.c b/test/api/t16.c index 07da77c..608d510 100644 --- a/test/api/t16.c +++ b/test/api/t16.c @@ -1,4 +1,4 @@ -/* $Id: t16.c,v 1.11 2007-04-16 21:54:37 adam Exp $ +/* $Id: t16.c,v 1.12 2007-05-08 12:50:05 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -33,7 +33,7 @@ const char *myrec[] = { #define NUMBER_TO_FETCH_MAX 1000 static ZEBRA_RES fetch_first(ZebraHandle zh, const char *element_set, - const int * format, ODR odr, + const Odr_oid * format, ODR odr, const char **rec_buf, size_t *rec_len) { ZebraRetrievalRecord retrievalRecord[1]; @@ -61,7 +61,7 @@ static ZEBRA_RES fetch_first(ZebraHandle zh, const char *element_set, } static ZEBRA_RES fetch_first_compare(ZebraHandle zh, const char *element_set, - const int *format, const char *cmp_rec) + const Odr_oid *format, const char *cmp_rec) { const char *rec_buf = 0; size_t rec_len = 0; diff --git a/test/marcxml/m1.xml b/test/marcxml/m1.xml index 0a61202..105d88b 100644 --- a/test/marcxml/m1.xml +++ b/test/marcxml/m1.xml @@ -1,6 +1,6 @@ 00366nam 22001698a 4500 - 11224466 + 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng diff --git a/test/marcxml/record.abs b/test/marcxml/record.abs index 95c3357..828ea87 100644 --- a/test/marcxml/record.abs +++ b/test/marcxml/record.abs @@ -1,4 +1,4 @@ -# $Id: record.abs,v 1.9 2006-09-28 08:47:10 adam Exp $ +# $Id: record.abs,v 1.10 2007-05-08 12:50:06 adam Exp $ name marcxml attset bib1.att @@ -11,7 +11,7 @@ marc usmarc.mar xpath disable xelm /record/leader leader:w:range(data,0,5),leader2:w:range(data,5,3) -melm 001 Identifier-Standard:w +melm 001 Identifier-Standard:0 melm 008 Code-Language:w melm 017 Number-legal-deposit,Identifier-standard melm 018 Identifier-standard diff --git a/util/attrfind.c b/util/attrfind.c index 631e35d..b981034 100644 --- a/util/attrfind.c +++ b/util/attrfind.c @@ -1,4 +1,4 @@ -/* $Id: attrfind.c,v 1.3 2007-04-16 08:44:33 adam Exp $ +/* $Id: attrfind.c,v 1.4 2007-05-08 12:50:06 adam Exp $ Copyright (C) 2005-2007 Index Data ApS @@ -42,7 +42,7 @@ void attr_init_AttrList(AttrType *src, Z_AttributeList *list, int type) src->minor = 0; } -int attr_find_ex(AttrType *src, const int **attribute_set_oid, +int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, const char **string_value) { int num_attributes; @@ -96,7 +96,7 @@ int attr_find_ex(AttrType *src, const int **attribute_set_oid, return -1; } -int attr_find(AttrType *src, const int **attribute_set_id) +int attr_find(AttrType *src, const Odr_oid **attribute_set_id) { return attr_find_ex(src, attribute_set_id, 0); }