Rename struct attrvalues to yaz_facet_attr
[yaz-moved-to-github.git] / src / facet.c
index 721b7e3..bf1904b 100644 (file)
@@ -1,4 +1,16 @@
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
+ * See the file LICENSE for details.
+ */
 
+/** 
+ * \file facet.c
+ * \brief Facet utilities
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <yaz/facet.h>
 #include <yaz/diagbib1.h>
@@ -11,7 +23,7 @@
 /* Gets the first string, there is usually only one */
 /* in case of errors, returns null */
 
-void facet_struct_init(struct attrvalues *attr_values) {
+void facet_struct_init(struct yaz_facet_attr *attr_values) {
     attr_values->errcode   = 0;
     attr_values->errstring = 0;
     attr_values->relation  = 0;
@@ -33,7 +45,7 @@ const char *stringattr( Z_ComplexAttribute *c ) {
 
 /* Use attribute, @attr1, can be numeric or string */
 void useattr ( Z_AttributeElement *ae,
-                       struct attrvalues *av )
+                       struct yaz_facet_attr *av )
 {
     const char *s;
     if ( ae->which == Z_AttributeValue_complex ) {
@@ -59,7 +71,7 @@ void useattr ( Z_AttributeElement *ae,
 
 /* TODO rename to sortorder attr */
 void relationattr ( Z_AttributeElement *ae,
-                           struct attrvalues *av )
+                           struct yaz_facet_attr *av )
 {
     if ( ae->which == Z_AttributeValue_numeric ) {
         if ( *ae->value.numeric == 0 )
@@ -82,7 +94,7 @@ void relationattr ( Z_AttributeElement *ae,
 } /* relationattr */
 
 void limitattr ( Z_AttributeElement *ae,
-                        struct attrvalues *av )
+                        struct yaz_facet_attr *av )
 {
   /* TODO - check numeric first, then value! */
     if ( ae->which == Z_AttributeValue_numeric ) {
@@ -105,7 +117,7 @@ void limitattr ( Z_AttributeElement *ae,
 */
 
 void facetattrs( Z_AttributeList *attributes,
-                          struct attrvalues *av )
+                          struct yaz_facet_attr *av )
 {
     int i;
     Z_AttributeElement *ae;
@@ -181,3 +193,12 @@ void facet_list_field_set(ODR odr, Z_FacetList *list, Z_FacetField *field, int i
     list->elements[index] = field;
 }
 
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+