YAZ_EXPORT void wrbuf_diags(WRBUF b, int num_diagnostics,Z_DiagRec **diags);
YAZ_EXPORT void yaz_encode_pqf_term(WRBUF b, const char *term, int len);
+
+YAZ_EXPORT void yaz_facet_list_to_wrbuf(WRBUF w, const Z_FacetList *fl);
+
YAZ_END_CDECL
#endif
}
}
-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;
- 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:
}
}
+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