Rename yaz_use_attribute_create to zget_AttributeList_use_string
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 21 Mar 2014 10:48:22 +0000 (11:48 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 21 Mar 2014 10:48:22 +0000 (11:48 +0100)
include/yaz/proto.h
src/pquery.c
src/solr.c
src/sru_facet.c
src/srw.c

index a5115e8..6380341 100644 (file)
@@ -199,7 +199,7 @@ Z_DefaultDiagFormat *yaz_decode_init_diag(int no, Z_InitResponse *initrs);
     \returns attribute list with only one use-attribute
 */
 YAZ_EXPORT
     \returns attribute list with only one use-attribute
 */
 YAZ_EXPORT
-Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name);
+Z_AttributeList *zget_AttributeList_use_string(ODR o, const char *name);
 
 YAZ_END_CDECL
 
 
 YAZ_END_CDECL
 
index 3fdabe9..f913a0f 100644 (file)
@@ -307,10 +307,10 @@ static Z_AttributeList *get_attributeList(ODR o,
     return attributes;
 }
 
     return attributes;
 }
 
-Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name)
+Z_AttributeList *zget_AttributeList_use_string(ODR o, const char *name)
 {
     Odr_int attr_list[2];
 {
     Odr_int attr_list[2];
-    const char *attr_clist[1];
+    char *attr_clist[1];
     Odr_oid *attr_set[1];
 
     attr_list[0] = 1;
     Odr_oid *attr_set[1];
 
     attr_list[0] = 1;
index 4ae57bb..c1c1bba 100644 (file)
@@ -154,7 +154,7 @@ Z_FacetField *yaz_solr_decode_facet_field(ODR o, xmlNodePtr ptr,
     xmlNodePtr node;
     // USE attribute
     const char* name = yaz_element_attribute_value_get(ptr, "lst", "name");
     xmlNodePtr node;
     // USE attribute
     const char* name = yaz_element_attribute_value_get(ptr, "lst", "name");
-    list = yaz_use_attribute_create(o, name);
+    list = zget_AttributeList_use_string(o, name);
     for (node = ptr->children; node; node = node->next)
         num_terms++;
     facet_field = facet_field_create(o, list, num_terms);
     for (node = ptr->children; node; node = node->next)
         num_terms++;
     facet_field = facet_field_create(o, list, num_terms);
index 6802b15..7821f66 100644 (file)
@@ -259,8 +259,8 @@ void yaz_sru_facet_response(ODR o, Z_FacetList **facetList, xmlNodePtr n)
                             p_terms = p2;
                     }
                     if (index_name)
                             p_terms = p2;
                     }
                     if (index_name)
-                        ff->attributes = yaz_use_attribute_create(o,
-                                                                  index_name);
+                        ff->attributes =
+                            zget_AttributeList_use_string(o, index_name);
                     if (p_terms)
                     {
                         xmlNode *p;
                     if (p_terms)
                     {
                         xmlNode *p;
index f4a6453..5076ecc 100644 (file)
--- a/src/srw.c
+++ b/src/srw.c
@@ -308,7 +308,7 @@ static Z_FacetField *yaz_sru_proxy_decode_facet_field(ODR odr, xmlNodePtr ptr)
     const char* name = yaz_element_attribute_value_get(ptr, "facet", "code");
     yaz_log(YLOG_DEBUG, "sru-proxy facet type: %s", name);
 
     const char* name = yaz_element_attribute_value_get(ptr, "facet", "code");
     yaz_log(YLOG_DEBUG, "sru-proxy facet type: %s", name);
 
-    list = yaz_use_attribute_create(odr, name);
+    list = zget_AttributeList_use_string(odr, name);
     for (node = ptr->children; node; node = node->next) {
         if (yaz_match_xsd_element(node, "facetvalue"))
             num_terms++;
     for (node = ptr->children; node; node = node->next) {
         if (yaz_match_xsd_element(node, "facetvalue"))
             num_terms++;