projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed compilation and tests for case where Libxml2 is unavailable.
[yaz-moved-to-github.git]
/
src
/
querytowrbuf.c
diff --git
a/src/querytowrbuf.c
b/src/querytowrbuf.c
index
b686ba1
..
2381010
100644
(file)
--- a/
src/querytowrbuf.c
+++ b/
src/querytowrbuf.c
@@
-1,18
+1,18
@@
/*
/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* All rights reserved.
*
* All rights reserved.
*
- * $Id: querytowrbuf.c,v 1.1 2006-01-20 10:34:51 adam Exp $
+ * $Id: querytowrbuf.c,v 1.6 2007-01-03 08:42:15 adam Exp $
*/
*/
-/**
- * \file querytostr.c
- * \brief Query to WRBUF (to strings)
+/** \file querytowrbuf.c
+ \brief Query to WRBUF (to strings)
*/
#include <stdio.h>
#include <assert.h>
*/
#include <stdio.h>
#include <assert.h>
+#include <yaz/logrpn.h>
#include <yaz/querytowrbuf.h>
static void yaz_term_to_wrbuf(WRBUF b, const char *term, int len)
#include <yaz/querytowrbuf.h>
static void yaz_term_to_wrbuf(WRBUF b, const char *term, int len)
@@
-188,7
+188,7
@@
void yaz_rpnquery_to_wrbuf(WRBUF b, const Z_RPNQuery *rpn)
if (attrset)
{
ast = attrset->value;
if (attrset)
{
ast = attrset->value;
- wrbuf_printf(b, " @attrset %s ", attrset->desc);
+ wrbuf_printf(b, "@attrset %s ", attrset->desc);
}
yaz_rpnstructure_to_wrbuf(b, rpn->RPNStructure);
wrbuf_chop_right(b);
}
yaz_rpnstructure_to_wrbuf(b, rpn->RPNStructure);
wrbuf_chop_right(b);
@@
-202,21
+202,21
@@
void yaz_query_to_wrbuf(WRBUF b, const Z_Query *q)
{
case Z_Query_type_1:
case Z_Query_type_101:
{
case Z_Query_type_1:
case Z_Query_type_101:
- wrbuf_printf(b,"RPN:");
+ wrbuf_printf(b,"RPN ");
yaz_rpnquery_to_wrbuf(b, q->u.type_1);
break;
case Z_Query_type_2:
yaz_rpnquery_to_wrbuf(b, q->u.type_1);
break;
case Z_Query_type_2:
- wrbuf_printf(b, "CCL: %.*s", q->u.type_2->len, q->u.type_2->buf);
+ wrbuf_printf(b, "CCL %.*s", q->u.type_2->len, q->u.type_2->buf);
break;
case Z_Query_type_100:
break;
case Z_Query_type_100:
- wrbuf_printf(b, "Z39.58: %.*s", q->u.type_100->len,
+ wrbuf_printf(b, "Z39.58 %.*s", q->u.type_100->len,
q->u.type_100->buf);
break;
case Z_Query_type_104:
if (q->u.type_104->which == Z_External_CQL)
q->u.type_100->buf);
break;
case Z_Query_type_104:
if (q->u.type_104->which == Z_External_CQL)
- wrbuf_printf(b, "CQL: %s", q->u.type_104->u.cql);
+ wrbuf_printf(b, "CQL %s", q->u.type_104->u.cql);
else
else
- wrbuf_printf(b,"Unknown type 104 query %d", q->u.type_104->which);
+ wrbuf_printf(b,"UNKNOWN type 104 query %d", q->u.type_104->which);
}
}
}
}
@@
-224,6
+224,7
@@
void yaz_scan_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt,
oid_value ast)
{
/* should print attr set here */
oid_value ast)
{
/* should print attr set here */
+ wrbuf_printf(b, "RPN ");
yaz_apt_to_wrbuf(b, zapt);
}
yaz_apt_to_wrbuf(b, zapt);
}