X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fattribute.c;h=785ff8a7fceccbbeedbdefd7b0dc7735ee98aa63;hp=fc78955de889767aa19e69e594afad83a838b564;hb=e2d9fea369fcf6f0e8927b7b53b69d0bc4f9a50a;hpb=3f837255e2e97bd39ffabb13621d398f5610348c diff --git a/index/attribute.c b/index/attribute.c index fc78955..785ff8a 100644 --- a/index/attribute.c +++ b/index/attribute.c @@ -1,8 +1,5 @@ -/* $Id: attribute.c,v 1.32 2007-05-25 12:17:11 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1994-2011 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -20,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -69,7 +69,7 @@ static int att_getentbyatt(ZebraHandle zi, const Odr_oid *set, int att, ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, - int index_type, + const char *index_type, const Odr_oid *curAttributeSet, int *ord) { @@ -134,7 +134,7 @@ ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, - int index_type, + const char *index_type, const char *xpath_use, const Odr_oid *curAttributeSet, int *ord) @@ -172,14 +172,14 @@ ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, xpath_use); if (*ord == -1) { - yaz_log(YLOG_LOG, "zebra_apt_get_ord FAILED xpath=%s index_type=%c", + yaz_log(YLOG_LOG, "zebra_apt_get_ord FAILED xpath=%s index_type=%s", xpath_use, index_type); zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, 0); res = ZEBRA_FAIL; } else { - yaz_log(YLOG_LOG, "zebra_apt_get_ord OK xpath=%s index_type=%c", + yaz_log(YLOG_LOG, "zebra_apt_get_ord OK xpath=%s index_type=%s", xpath_use, index_type); } @@ -205,7 +205,7 @@ ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, if (zebra_attr_list_get_ord( zh, sortAttributes->list, zinfo_index_category_sort, - -1 /* any index */, yaz_oid_attset_bib_1, ord) == ZEBRA_OK) + 0 /* any index */, yaz_oid_attset_bib_1, ord) == ZEBRA_OK) return ZEBRA_OK; return ZEBRA_FAIL; } @@ -214,6 +214,7 @@ ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab