- if (!(req->termListAndStartPoint =
- p_query_scan(out, protocol, &req->attributeSet, string)))
+#if CCL2RPN
+ if (queryType == QueryType_CCL2RPN)
+ {
+ oident bib1;
+ int error, pos;
+ struct ccl_rpn_node *rpn;
+
+ rpn = ccl_find_str (bibset, query, &error, &pos);
+ if (error)
+ {
+ printf("CCL ERROR: %s\n", ccl_err_msg(error));
+ return 0;
+ }
+ use_rpn = 0;
+ bib1.proto = PROTO_Z3950;
+ bib1.oclass = CLASS_ATTSET;
+ bib1.value = VAL_BIB1;
+ req->attributeSet = oid_ent_to_oid (&bib1, oid);
+ if (!(req->termListAndStartPoint = ccl_scan_query (out, rpn)))
+ {
+ printf("Couldn't convert CCL to Scan term\n");
+ return 0;
+ }
+ ccl_rpn_delete (rpn);
+ }
+#endif
+ if (use_rpn && !(req->termListAndStartPoint =
+ p_query_scan(out, protocol, &req->attributeSet, query)))