Fixed the asn1 for facets
[yaz-moved-to-github.git] / src / sortspec.c
index 3ca7e03..d469718 100644 (file)
@@ -1,8 +1,6 @@
-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
  * See the file LICENSE for details.
- *
- * $Id: sortspec.c,v 1.8 2007-01-03 08:42:15 adam Exp $
  */
 /**
  * \file sortspec.c
@@ -14,8 +12,8 @@
 #include <stdlib.h>
 
 #include <yaz/proto.h>
-#include <yaz/oid.h>
 #include <yaz/sortspec.h>
+#include <yaz/oid_db.h>
 
 Z_SortKeySpecList *yaz_sort_spec (ODR out, const char *arg)
 {
@@ -49,8 +47,7 @@ Z_SortKeySpecList *yaz_sort_spec (ODR out, const char *arg)
             sk->which = Z_SortKey_sortAttributes;
             sk->u.sortAttributes = (Z_SortAttributes *)
                 odr_malloc (out, sizeof(*sk->u.sortAttributes));
-            sk->u.sortAttributes->id = 
-                yaz_oidval_to_z3950oid(out, CLASS_ATTSET, VAL_BIB1);
+            sk->u.sortAttributes->id = odr_oiddup(out, yaz_oid_attset_bib_1);
             sk->u.sortAttributes->list = (Z_AttributeList *)
                 odr_malloc (out, sizeof(*sk->u.sortAttributes->list));
             sk->u.sortAttributes->list->attributes = (Z_AttributeElement **)
@@ -133,6 +130,7 @@ Z_SortKeySpecList *yaz_sort_spec (ODR out, const char *arg)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab