X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsortspec.c;h=c733aad8d5dc4b79ff72c088dcff1d2984677cbd;hp=b76a2535048b73f48e79ca9768b3296be2c4e9cc;hb=896b145fa7a02199bfc3e8aa824c018b9d7cbf98;hpb=7a4064cd15f6c6b34c1180e1bc51f0d0e90da320 diff --git a/src/sortspec.c b/src/sortspec.c index b76a253..c733aad 100644 --- a/src/sortspec.c +++ b/src/sortspec.c @@ -1,13 +1,14 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. - * - * $Id: sortspec.c,v 1.9 2007-04-12 13:52:57 adam Exp $ */ /** * \file sortspec.c * \brief Implements SortSpec parsing. */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -49,9 +50,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_string_to_oid_odr(yaz_oid_std(), - CLASS_ATTSET, OID_STR_BIB1, out); + 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 **) @@ -134,6 +133,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