projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix idmetaversion strips n SA-743
[yaz-moved-to-github.git]
/
src
/
querytowrbuf.c
diff --git
a/src/querytowrbuf.c
b/src/querytowrbuf.c
index
21f8e97
..
79a9b6e
100644
(file)
--- a/
src/querytowrbuf.c
+++ b/
src/querytowrbuf.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/** \file querytowrbuf.c
* See the file LICENSE for details.
*/
/** \file querytowrbuf.c
@@
-107,13
+107,16
@@
static const char *complex_op_name(const Z_Operator *op)
}
}
}
}
-static void yaz_apt_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt)
+static void yaz_attributes_to_wrbuf(WRBUF w, const Z_AttributeList *al)
{
{
- int num_attributes = zapt->attributes->num_attributes;
int i;
int i;
- for (i = 0; i < num_attributes; i++)
- yaz_attribute_element_to_wrbuf(b,zapt->attributes->attributes[i]);
+ for (i = 0; i < al->num_attributes; i++)
+ yaz_attribute_element_to_wrbuf(w, al->attributes[i]);
+}
+static void yaz_apt_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt)
+{
+ yaz_attributes_to_wrbuf(b, zapt->attributes);
switch (zapt->term->which)
{
case Z_Term_general:
switch (zapt->term->which)
{
case Z_Term_general:
@@
-266,6
+269,19
@@
void wrbuf_diags(WRBUF b, int num_diagnostics, Z_DiagRec **diags)
}
}
}
}
+void yaz_facet_list_to_wrbuf(WRBUF w, const Z_FacetList *fl)
+{
+ int i;
+ for (i = 0; i < fl->num; i++)
+ {
+ Z_FacetField *ff = fl->elements[i];
+
+ if (i)
+ wrbuf_puts(w, ", ");
+ yaz_attributes_to_wrbuf(w, ff->attributes);
+ }
+}
+
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4