X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Flogrpn.c;h=06c675e1dcb7d859b3f687a92ab91c682eab994b;hb=46767b31f38d6b9a1964319c5473c948dbb10c1d;hp=c7e69cb58dc00f460cd2be4c3220c3a15ab12f9e;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7;p=yaz-moved-to-github.git diff --git a/src/logrpn.c b/src/logrpn.c index c7e69cb..06c675e 100644 --- a/src/logrpn.c +++ b/src/logrpn.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -15,7 +15,7 @@ #include #include -static const char *relToStr(int v) +static const char *relToStr(Odr_int v) { const char *str = 0; switch (v) @@ -34,7 +34,7 @@ static const char *relToStr(int v) return str; } -static void attrStr (int type, int value, char *str) +static void attrStr (Odr_int type, Odr_int value, char *str) { const char *rstr; *str = '\0'; @@ -206,7 +206,8 @@ static void zlog_attributes(Z_AttributesPlusTerm *t, int depth, yaz_log (loglevel, "%*.0s%s %s", depth, "", attset_name, str); break; case Z_AttributeValue_complex: - yaz_log (loglevel, "%*.0s%s attributeType=%d complex", + yaz_log (loglevel, "%*.0s%s attributeType=" ODR_INT_PRINTF + " complex", depth, "", attset_name, *element->attributeType); for (i = 0; ivalue.complex->num_list; i++) { @@ -216,7 +217,8 @@ static void zlog_attributes(Z_AttributesPlusTerm *t, int depth, element->value.complex->list[i]->u.string); else if (element->value.complex->list[i]->which == Z_StringOrNumeric_numeric) - yaz_log (loglevel, "%*.0s numeric: '%d'", depth, "", + yaz_log (loglevel, "%*.0s numeric: '" ODR_INT_PRINTF + " '", depth, "", *element->value.complex->list[i]->u.numeric); } break; @@ -279,7 +281,8 @@ static void zlog_structure(Z_RPNStructure *zs, int depth, yaz_log (loglevel, "%*.0s %s", depth, "", complex_op_name(op) ); break; case Z_Operator_prox: - yaz_log (loglevel, "%*.0s prox excl=%s dist=%d order=%s " + yaz_log (loglevel, "%*.0s prox excl=%s dist=" ODR_INT_PRINTF + " order=%s " "rel=%s unit=%s", depth, "", op->u.prox->exclusion ? (*op->u.prox->exclusion ? "T" : "F") : "N", @@ -313,7 +316,8 @@ static void zlog_structure(Z_RPNStructure *zs, int depth, zapt->term->u.characterString); break; case Z_Term_numeric: - yaz_log (loglevel, "%*.0s term '%d' (numeric)", depth, "", + yaz_log (loglevel, "%*.0s term '" ODR_INT_PRINTF + "' (numeric)", depth, "", *zapt->term->u.numeric); break; case Z_Term_null: @@ -397,6 +401,7 @@ void yaz_log_zquery (Z_Query *q) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab