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
WIN32 Updates for GFS to use TLS for control block.
[yaz-moved-to-github.git]
/
src
/
cclptree.c
diff --git
a/src/cclptree.c
b/src/cclptree.c
index
1c36a03
..
49f088a
100644
(file)
--- a/
src/cclptree.c
+++ b/
src/cclptree.c
@@
-41,10
+41,19
@@
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
+
+/**
+ * \file cclptree.c
+ * \brief Implements CCL parse tree printing
+ *
+ * This source file implements functions to parse and print
+ * a CCL node tree (as a result of parsing).
+ */
+
/* CCL print rpn tree - infix notation
* Europagate, 1995
*
/* CCL print rpn tree - infix notation
* Europagate, 1995
*
- * $Id: cclptree.c,v 1.1 2003-10-27 12:21:30 adam Exp $
+ * $Id: cclptree.c,v 1.4 2004-12-30 00:22:25 adam Exp $
*
* Old Europagate Log:
*
*
* Old Europagate Log:
*
@@
-93,7
+102,7
@@
void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
for (attr = rpn->u.t.attr_list; attr; attr = attr->next)
{
if (attr->set)
for (attr = rpn->u.t.attr_list; attr; attr = attr->next)
{
if (attr->set)
- fprintf(fd_out, "@attr %s", attr->set);
+ fprintf(fd_out, "@attr %s ", attr->set);
else
fprintf(fd_out, "@attr ");
switch(attr->kind)
else
fprintf(fd_out, "@attr ");
switch(attr->kind)
@@
-136,7
+145,7
@@
void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
if (*cp == '!')
{
/* word order specified */
if (*cp == '!')
{
/* word order specified */
- if (isdigit(cp[1]))
+ if (isdigit(((const unsigned char *) cp)[1]))
fprintf(fd_out, "@prox 0 %s 1 2 known 2", cp+1);
else
fprintf(fd_out, "@prox 0 1 1 2 known 2");
fprintf(fd_out, "@prox 0 %s 1 2 known 2", cp+1);
else
fprintf(fd_out, "@prox 0 1 1 2 known 2");
@@
-144,7
+153,7
@@
void ccl_pr_tree_as_qrpn(struct ccl_rpn_node *rpn, FILE *fd_out, int indent)
else if (*cp == '%')
{
/* word order not specified */
else if (*cp == '%')
{
/* word order not specified */
- if (isdigit(cp[1]))
+ if (isdigit(((const unsigned char *) cp)[1]))
fprintf(fd_out, "@prox 0 %s 0 2 known 2", cp+1);
else
fprintf(fd_out, "@prox 0 1 0 2 known 2");
fprintf(fd_out, "@prox 0 %s 0 2 known 2", cp+1);
else
fprintf(fd_out, "@prox 0 1 0 2 known 2");
@@
-186,7
+195,7
@@
static void ccl_pquery_complex (WRBUF w, struct ccl_rpn_node *p)
if (*cp == '!')
{
/* word order specified */
if (*cp == '!')
{
/* word order specified */
- if (isdigit(cp[1]))
+ if (isdigit(((const unsigned char *) cp)[1]))
wrbuf_printf(w, "@prox 0 %s 1 2 k 2 ", cp+1);
else
wrbuf_printf(w, "@prox 0 1 1 2 k 2 ");
wrbuf_printf(w, "@prox 0 %s 1 2 k 2 ", cp+1);
else
wrbuf_printf(w, "@prox 0 1 1 2 k 2 ");
@@
-194,7
+203,7
@@
static void ccl_pquery_complex (WRBUF w, struct ccl_rpn_node *p)
else if (*cp == '%')
{
/* word order not specified */
else if (*cp == '%')
{
/* word order not specified */
- if (isdigit(cp[1]))
+ if (isdigit(((const unsigned char *) cp)[1]))
wrbuf_printf(w, "@prox 0 %s 0 2 k 2 ", cp+1);
else
wrbuf_printf(w, "@prox 0 1 0 2 k 2 ");
wrbuf_printf(w, "@prox 0 %s 0 2 k 2 ", cp+1);
else
wrbuf_printf(w, "@prox 0 1 0 2 k 2 ");
@@
-265,7
+274,7
@@
void ccl_pquery (WRBUF w, struct ccl_rpn_node *p)
/*
* Local variables:
/*
* Local variables:
- * tab-width: 4
+ * tab-width: 8
* c-basic-offset: 4
* End:
*/
* c-basic-offset: 4
* End:
*/