Remove the oid_name_to_dotstring() function, which is now in oid.c
[yaz-moved-to-github.git] / zutil / logrpn.c
index 95460cb..6da0070 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (C) 1995-2001, Index Data
+ * Copyright (C) 1995-2003, Index Data
  * All rights reserved.
  *
- * $Id: logrpn.c,v 1.8 2002-12-28 12:13:03 adam Exp $
+ * $Id: logrpn.c,v 1.11 2003-02-27 19:56:00 adam Exp $
  */
 #include <stdio.h>
 
@@ -143,6 +143,9 @@ static void attrStr (int type, int value, enum oid_value ast, char *str)
             case 103:
                 sprintf (str, "truncation=re-2");
                 break;
+            case 104:
+                sprintf (str, "truncation=CCL");
+                break;
             default:
                 sprintf (str, "truncation");
             }
@@ -350,3 +353,16 @@ 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)
+{
+    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);
+    }
+}