X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Flogrpn.c;h=e6a225755da670355aeda182c00fb8c5a2368993;hb=8fba4cf2cac1cc543aa4c1063c78b449ebac44a7;hp=1a37e0f99ad2f66ce2e638d873f07df2b052c159;hpb=e5c44d40aa8c2f5ab2dc7ad1e0b15d67eaca78c1;p=yaz-moved-to-github.git diff --git a/src/logrpn.c b/src/logrpn.c index 1a37e0f..e6a2257 100644 --- a/src/logrpn.c +++ b/src/logrpn.c @@ -1,12 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** * \file logrpn.c * \brief Implements Z39.50 Query Printing */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -48,7 +50,7 @@ static void attrStr(Odr_int type, Odr_int value, char *str) if (rstr) sprintf(str, "relation=%s", rstr); else - sprintf(str, "relation=%d", value); + sprintf(str, "relation=" ODR_INT_PRINTF, value); break; case 3: switch (value) @@ -170,9 +172,10 @@ static void attrStr(Odr_int type, Odr_int value, char *str) break; } if (*str) - sprintf(str + strlen(str), " (%d=%d)", type, value); + sprintf(str + strlen(str), " (" ODR_INT_PRINTF "=" ODR_INT_PRINTF")", + type, value); else - sprintf(str, "%d=%d", type, value); + sprintf(str, ODR_INT_PRINTF "=" ODR_INT_PRINTF, type, value); } /* @@ -246,7 +249,7 @@ static char *complex_op_name(Z_Operator *op) } } -static char *prox_unit_name(Z_ProximityOperator *op) +char *yaz_prox_unit_name(Z_ProximityOperator *op) { if (op->which!=Z_ProximityOperator_known) return "private"; @@ -289,7 +292,7 @@ static void zlog_structure(Z_RPNStructure *zs, int depth, *op->u.prox->distance, *op->u.prox->ordered ? "T" : "F", relToStr(*op->u.prox->relationType), - prox_unit_name(op->u.prox) ); + yaz_prox_unit_name(op->u.prox) ); break; default: yaz_log(loglevel, "%*.0s unknown complex", depth, "");