27 int sep_char = indent == -1 ?
' ' :
'\n';
28 int next_indent = indent == -1 ? indent : indent+1;
43 const char *cp = p->
u.
p[2]->
u.
t.term;
87 for (i = 0; i < indent; i++)
105 for (att = p->
u.
t.attr_list; att; att = att->
next)
121 sprintf(tmpattr,
"%d=", att->
type);
Header with public definitions for CCL.
#define CCL_RPN_ATTR_STRING
#define CCL_RPN_ATTR_NUMERIC
static void ccl_pquery_complex(WRBUF w, struct ccl_rpn_node *p, int indent)
void ccl_pquery(WRBUF w, struct ccl_rpn_node *p)
void ccl_pr_tree(struct ccl_rpn_node *rpn, FILE *fd_out)
static void ccl_pquery_indent(WRBUF w, struct ccl_rpn_node *p, int indent)
static void ccl_prterm(WRBUF w, const char *term)
void yaz_encode_pqf_term(WRBUF b, const char *term, int len)
Query to WRBUF (to strings)
attribute node (type, value) pair as used in RPN
char * str
string attribute value
int kind
attribute value type (numeric or string)
int numeric
numeric attribute value
int type
attribute type, Bib-1: 1=use, 2=relation, 3=position, etc
union ccl_rpn_attr::@7 value
struct ccl_rpn_attr * next
next attribute
struct ccl_rpn_node * p[3]
Boolean including proximity 0=left, 1=right, 2=prox parms.
struct ccl_rpn_node::@8::@9 t
Attributes + Term.
enum ccl_rpn_kind kind
node type, one of CCL_RPN_AND, CCL_RPN_OR, etc
void wrbuf_destroy(WRBUF b)
destroy WRBUF and its buffer
WRBUF wrbuf_alloc(void)
construct WRBUF
void wrbuf_printf(WRBUF b, const char *fmt,...)
writes printf result to WRBUF
const char * wrbuf_cstr(WRBUF b)
returns WRBUF content as C-string
void wrbuf_puts(WRBUF b, const char *buf)
appends C-string to WRBUF
Header for YAZ iconv interface.