+
+static int ccl2pqf(ODR odr, const Odr_oct *ccl, CCL_bibset bibset,
+ bend_search_rr *bsrr) {
+ char *ccl0;
+ struct ccl_rpn_node *node;
+ int errcode, pos;
+
+ ccl0 = odr_strdupn(odr, (char*) ccl->buf, ccl->len);
+ if ((node = ccl_find_str(bibset, ccl0, &errcode, &pos)) == 0) {
+ bsrr->errstring = (char*) ccl_err_msg(errcode);
+ return 10; /* Query syntax error */
+ }
+
+ bsrr->query->which = Z_Query_type_1;
+ bsrr->query->u.type_1 = ccl_rpn_query(odr, node);
+ return 0;
+}
+
+