X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsortspec.c;h=c3470364740d2b4819576a871e950539ff6c507c;hp=f9a4bc389ec5fb7615f2d2132b27941391df72f6;hb=4e3f7be8266559e07dc01ae5d6aba31d30b8bd44;hpb=4d1e4573d65a535e8f64527fd42434dcb08f0041 diff --git a/src/sortspec.c b/src/sortspec.c index f9a4bc3..c347036 100644 --- a/src/sortspec.c +++ b/src/sortspec.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2006, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: sortspec.c,v 1.6 2006-05-30 21:39:15 adam Exp $ */ /** * \file sortspec.c @@ -14,8 +12,8 @@ #include #include -#include #include +#include 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 **) @@ -120,7 +117,8 @@ Z_SortKeySpecList *yaz_sort_spec (ODR out, const char *arg) i++; sks->u.missingValueData->len = strlen(sort_flags+i); sks->u.missingValueData->size = sks->u.missingValueData->len; - sks->u.missingValueData->buf = odr_strdup(out, sort_flags+i); + sks->u.missingValueData->buf = (unsigned char*) + odr_strdup(out, sort_flags+i); i += strlen(sort_flags+i); } } @@ -132,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