- resultSetAddRPN (zh, odr_extract_mem(o), query,
- zh->num_basenames, zh->basenames, setname);
-
- zebra_end_read (zh);
- max = res_get (zh->res, "maxhits");
- if (max)
- maxhits = atoi(max);
- else {
- int i = 0;
- maxhits = INT_MAX; /* properly rounded, to make it look like a limit*/
- while (maxhits>100) { maxhits/=10; i++;}
- while (i--) maxhits *= 10;
- }
- if (zh->hits > maxhits) { /* too large for yaz to handle */
- yaz_log(YLOG_DEBUG, "limiting hits to "ZINT_FORMAT, maxhits);
- *hits = maxhits;
- }
- else
- *hits = zh->hits;
- return 0;
+ r = resultSetAddRPN(zh, odr_extract_mem(o), query,
+ zh->num_basenames, zh->basenames, setname);
+ zebra_end_read(zh);
+ *hits = zh->hits;
+ return r;