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
WRBUF: size_t for sizes, void funcs.
[yaz-moved-to-github.git]
/
src
/
pquery.c
diff --git
a/src/pquery.c
b/src/pquery.c
index
c25a795
..
1ce5273
100644
(file)
--- a/
src/pquery.c
+++ b/
src/pquery.c
@@
-31,7
+31,7
@@
struct yaz_pqf_parser {
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
- odr_int_t *attr_list, char **attr_clist,
+ Odr_int *attr_list, char **attr_clist,
Odr_oid **attr_set);
static Odr_oid *query_oid_getvalbyname(struct yaz_pqf_parser *li, ODR o)
Odr_oid **attr_set);
static Odr_oid *query_oid_getvalbyname(struct yaz_pqf_parser *li, ODR o)
@@
-183,7
+183,7
@@
static int escape_string(char *out_buf, const char *in, int len)
}
static int p_query_parse_attr(struct yaz_pqf_parser *li, ODR o,
}
static int p_query_parse_attr(struct yaz_pqf_parser *li, ODR o,
- int num_attr, odr_int_t *attr_list,
+ int num_attr, Odr_int *attr_list,
char **attr_clist, Odr_oid **attr_set)
{
const char *cp;
char **attr_clist, Odr_oid **attr_set)
{
const char *cp;
@@
-239,7
+239,7
@@
static int p_query_parse_attr(struct yaz_pqf_parser *li, ODR o,
}
static Z_AttributesPlusTerm *rpn_term(struct yaz_pqf_parser *li, ODR o,
}
static Z_AttributesPlusTerm *rpn_term(struct yaz_pqf_parser *li, ODR o,
- int num_attr, odr_int_t *attr_list,
+ int num_attr, Odr_int *attr_list,
char **attr_clist, Odr_oid **attr_set)
{
Z_AttributesPlusTerm *zapt;
char **attr_clist, Odr_oid **attr_set)
{
Z_AttributesPlusTerm *zapt;
@@
-256,12
+256,12
@@
static Z_AttributesPlusTerm *rpn_term(struct yaz_pqf_parser *li, ODR o,
else
{
int i, k = 0;
else
{
int i, k = 0;
- odr_int_t *attr_tmp;
+ Odr_int *attr_tmp;
elements = (Z_AttributeElement**)
odr_malloc (o, num_attr * sizeof(*elements));
elements = (Z_AttributeElement**)
odr_malloc (o, num_attr * sizeof(*elements));
- attr_tmp = (odr_int_t *)odr_malloc(o, num_attr * 2 * sizeof(*attr_tmp));
+ attr_tmp = (Odr_int *)odr_malloc(o, num_attr * 2 * sizeof(*attr_tmp));
memcpy(attr_tmp, attr_list, num_attr * 2 * sizeof(*attr_tmp));
for (i = num_attr; --i >= 0; )
{
memcpy(attr_tmp, attr_list, num_attr * 2 * sizeof(*attr_tmp));
for (i = num_attr; --i >= 0; )
{
@@
-348,7
+348,7
@@
static Z_AttributesPlusTerm *rpn_term(struct yaz_pqf_parser *li, ODR o,
}
static Z_Operand *rpn_simple(struct yaz_pqf_parser *li, ODR o,
}
static Z_Operand *rpn_simple(struct yaz_pqf_parser *li, ODR o,
- int num_attr, odr_int_t *attr_list,
+ int num_attr, Odr_int *attr_list,
char **attr_clist,
Odr_oid **attr_set)
{
char **attr_clist,
Odr_oid **attr_set)
{
@@
-484,7
+484,7
@@
static Z_ProximityOperator *rpn_proximity (struct yaz_pqf_parser *li, ODR o)
static Z_Complex *rpn_complex(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
static Z_Complex *rpn_complex(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
- odr_int_t *attr_list, char **attr_clist,
+ Odr_int *attr_list, char **attr_clist,
Odr_oid **attr_set)
{
Z_Complex *zc;
Odr_oid **attr_set)
{
Z_Complex *zc;
@@
-531,7
+531,7
@@
static Z_Complex *rpn_complex(struct yaz_pqf_parser *li, ODR o,
return zc;
}
return zc;
}
-static void rpn_term_type(struct yaz_pqf_parser *li, ODR o)
+static void rpn_term_type(struct yaz_pqf_parser *li)
{
if (!li->query_look)
return ;
{
if (!li->query_look)
return ;
@@
-560,7
+560,7
@@
static void rpn_term_type(struct yaz_pqf_parser *li, ODR o)
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
int num_attr, int max_attr,
- odr_int_t *attr_list,
+ Odr_int *attr_list,
char **attr_clist,
Odr_oid **attr_set)
{
char **attr_clist,
Odr_oid **attr_set)
{
@@
-609,7
+609,7
@@
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
attr_clist, attr_set);
case 'y':
lex (li);
attr_clist, attr_set);
case 'y':
lex (li);
- rpn_term_type (li, o);
+ rpn_term_type(li);
return
rpn_structure (li, o, num_attr, max_attr, attr_list,
attr_clist, attr_set);
return
rpn_structure (li, o, num_attr, max_attr, attr_list,
attr_clist, attr_set);
@@
-620,10
+620,10
@@
static Z_RPNStructure *rpn_structure(struct yaz_pqf_parser *li, ODR o,
return sz;
}
return sz;
}
-Z_RPNQuery *p_query_rpn_mk(ODR o, struct yaz_pqf_parser *li, const char *qbuf)
+static Z_RPNQuery *p_query_rpn_mk(ODR o, struct yaz_pqf_parser *li)
{
Z_RPNQuery *zq;
{
Z_RPNQuery *zq;
- odr_int_t attr_array[1024];
+ Odr_int attr_array[1024];
char *attr_clist[512];
Odr_oid *attr_set[512];
Odr_oid *top_set = 0;
char *attr_clist[512];
Odr_oid *attr_set[512];
Odr_oid *top_set = 0;
@@
-676,16
+676,15
@@
Z_RPNQuery *p_query_rpn(ODR o, const char *qbuf)
li.term_type = Z_Term_general;
li.query_buf = li.query_ptr = qbuf;
li.lex_buf = 0;
li.term_type = Z_Term_general;
li.query_buf = li.query_ptr = qbuf;
li.lex_buf = 0;
- return p_query_rpn_mk(o, &li, qbuf);
+ return p_query_rpn_mk(o, &li);
}
}
-Z_AttributesPlusTerm *p_query_scan_mk(struct yaz_pqf_parser *li,
- ODR o, oid_proto proto,
- Odr_oid **attributeSetP,
- const char *qbuf)
+static Z_AttributesPlusTerm *p_query_scan_mk(struct yaz_pqf_parser *li,
+ ODR o,
+ Odr_oid **attributeSetP)
{
{
- odr_int_t attr_list[1024];
+ Odr_int attr_list[1024];
char *attr_clist[512];
Odr_oid *attr_set[512];
int num_attr = 0;
char *attr_clist[512];
Odr_oid *attr_set[512];
int num_attr = 0;
@@
-735,7
+734,7
@@
Z_AttributesPlusTerm *p_query_scan_mk(struct yaz_pqf_parser *li,
else if (li->query_look == 'y')
{
lex (li);
else if (li->query_look == 'y')
{
lex (li);
- rpn_term_type (li, o);
+ rpn_term_type(li);
}
else
break;
}
else
break;
@@
-771,7
+770,7
@@
Z_AttributesPlusTerm *p_query_scan (ODR o, oid_proto proto,
li.query_buf = li.query_ptr = qbuf;
li.lex_buf = 0;
li.query_buf = li.query_ptr = qbuf;
li.lex_buf = 0;
- return p_query_scan_mk (&li, o, proto, attributeSetP, qbuf);
+ return p_query_scan_mk(&li, o, attributeSetP);
}
YAZ_PQF_Parser yaz_pqf_create (void)
}
YAZ_PQF_Parser yaz_pqf_create (void)
@@
-798,7
+797,7
@@
Z_RPNQuery *yaz_pqf_parse(YAZ_PQF_Parser p, ODR o, const char *qbuf)
return 0;
p->query_buf = p->query_ptr = qbuf;
p->lex_buf = 0;
return 0;
p->query_buf = p->query_ptr = qbuf;
p->lex_buf = 0;
- return p_query_rpn_mk (o, p, qbuf);
+ return p_query_rpn_mk(o, p);
}
Z_AttributesPlusTerm *yaz_pqf_scan(YAZ_PQF_Parser p, ODR o,
}
Z_AttributesPlusTerm *yaz_pqf_scan(YAZ_PQF_Parser p, ODR o,
@@
-809,7
+808,7
@@
Z_AttributesPlusTerm *yaz_pqf_scan(YAZ_PQF_Parser p, ODR o,
return 0;
p->query_buf = p->query_ptr = qbuf;
p->lex_buf = 0;
return 0;
p->query_buf = p->query_ptr = qbuf;
p->lex_buf = 0;
- return p_query_scan_mk (p, o, PROTO_Z3950, attributeSetP, qbuf);
+ return p_query_scan_mk(p, o, attributeSetP);
}
int yaz_pqf_error (YAZ_PQF_Parser p, const char **msg, size_t *off)
}
int yaz_pqf_error (YAZ_PQF_Parser p, const char **msg, size_t *off)