X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Flogrpn.c;fp=zutil%2Flogrpn.c;h=229c59f5bcadd4bbdb4a5a22237545a5f35787f6;hb=4d531a1a9131d69c3b6c27fbac42837e22cff61c;hp=95460cb4d691fa0f5641d8e2b014a4d3181d9f24;hpb=6c2e6af12b26825488c74a655a40a0cc75a863ca;p=yaz-moved-to-github.git diff --git a/zutil/logrpn.c b/zutil/logrpn.c index 95460cb..229c59f 100644 --- a/zutil/logrpn.c +++ b/zutil/logrpn.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2001, Index Data * All rights reserved. * - * $Id: logrpn.c,v 1.8 2002-12-28 12:13:03 adam Exp $ + * $Id: logrpn.c,v 1.9 2003-01-06 08:20:29 adam Exp $ */ #include @@ -350,3 +350,17 @@ void log_scan_term (Z_AttributesPlusTerm *zapt, oid_value ast) yaz_log (LOG_LOG, "%*.0s term (not general)", level, ""); zlog_attributes (zapt, level+2, ast); } + +void yaz_log_zquery (Z_Query *q) +{ + static int cql_oid[] = {1, 2, 840, 10003, 16, 2, -1}; + switch (q->which) + { + case Z_Query_type_1: case Z_Query_type_101: + log_rpn_query (q->u.type_1); + break; + case Z_Query_type_104: + if (q->u.type_104->which == Z_External_CQL) + yaz_log (LOG_LOG, "CQL: %s", q->u.type_104->u.cql); + } +}