-/*
- * Copyright (C) 1995-2007, Index Data ApS
- * All rights reserved.
- *
- * $Id: logrpn.c,v 1.17 2007-05-06 20:12:20 adam Exp $
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2009 Index Data
+ * See the file LICENSE for details.
*/
/**
* zlog_attributes: print attributes of term
*/
static void zlog_attributes(Z_AttributesPlusTerm *t, int depth,
- const int *ast, int loglevel)
+ const Odr_oid *ast, int loglevel)
{
int of, i;
char str[80];
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; i<element->value.complex->num_list; i++)
{
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;
}
static void zlog_structure(Z_RPNStructure *zs, int depth,
- const int *ast, int loglevel)
+ const Odr_oid *ast, int loglevel)
{
if (zs->which == Z_RPNStructure_complex)
{
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",
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:
}
void log_scan_term_level(int loglevel,
- Z_AttributesPlusTerm *zapt, const int *ast)
+ Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
{
int depth = 0;
if (!loglevel)
zlog_attributes(zapt, depth+2, ast, loglevel);
}
-void log_scan_term(Z_AttributesPlusTerm *zapt, const int *ast)
+void log_scan_term(Z_AttributesPlusTerm *zapt, const Odr_oid *ast)
{
log_scan_term_level (YLOG_LOG, zapt, ast);
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab