/* This file is part of the Zebra server.
- Copyright (C) 1994-2009 Index Data
+ Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
/** \file d1_doespec.c
* \brief handle Z39.50 variant-1 specs
- *
+ *
* See http://www.loc.gov/z3950/agency/defns/variant1.html
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
const Odr_oid *cur_oid = var->triples[i]->variantSetId;
if (!cur_oid)
cur_oid = var->globalVariantSetId;
- if (cur_oid && var_oid
+ if (cur_oid && var_oid
&& !oid_oidcmp(var_oid, cur_oid) && *var->triples[i]->type == type)
return var->triples[i];
}
{
int remove_flag = 0;
Z_Triple *r;
-
+
assert ((*c)->which == DATA1N_variant);
-
+
if ((*c)->u.variant.type->zclass->zclass == 4 &&
(*c)->u.variant.type->type == 1)
{
data1_tag *tag = 0;
if (c->u.tag.element)
tag = c->u.tag.element->tag;
-
+
*predicate = '\0';
sscanf(spec, "%63[^[]%c%63[^]]", elem, &dummy_ch, predicate);
if (data1_matchstr(elem, tag ? tag->value.string : c->u.tag.tag))
}
return 0;
}
-
+
static int match_children_here (data1_handle dh, data1_node *n,
Z_Espec1 *e, int i,
Z_ETagUnit **t, int num,
#if 1
if (!match_node_and_attr(c, str_val))
continue;
-#else
+#else
if (data1_matchstr(str_val,
tag ? tag->value.string : c->u.tag.tag))
continue;
/*
* 6,5: meta-data requested, variant list.
*/
- if (find_triple(vreq, e->defaultVariantSetId,
+ if (find_triple(vreq, e->defaultVariantSetId,
var_oid, 6, 5))
show_variantlist = 1;
/*
n = data1_get_root_tag (dh, n);
if (n && n->which == DATA1N_tag)
n->u.tag.node_selected = 1;
-
+
for (i = 0; i < e->num_elements; i++)
{
if (e->elements[i]->which != Z_ERequest_simpleElement)