#include <yaz/z-core.h>
#include <yaz/wrbuf.h>
-static void wrbuf_vputs(const char *buf, void *client_data)
-{
- wrbuf_write((WRBUF) client_data, buf, strlen(buf));
-}
-
static const char *lookup_index_from_string_attr(Z_AttributeList *attributes)
{
int j;
must_quote = 1;
if (must_quote)
wrbuf_puts(w, "\"");
+ if (trunc == 2 || trunc == 3)
+ wrbuf_puts(w, "*");
for (i = 0 ; i < lterm; i++)
{
if (sterm[i] == '\\' && i < lterm - 1)
else
wrbuf_putc(w, sterm[i]);
}
- if (trunc == 1)
+ if (trunc == 1 || trunc == 3)
wrbuf_puts(w, "*");
if (must_quote)
wrbuf_puts(w, "\"");
ret = rpn2solr_attr(ct, apt->attributes, w);
if (ret)
return ret;
- if (trunc == 0 || trunc == 1 || trunc == 100 || trunc == 104)
+ if ((trunc >= 0 && trunc <= 3) || trunc == 100 || trunc == 104)
;
else
{
WRBUF w,
Z_RPNQuery *q)
{
- return solr_transform_rpn2solr_stream(ct, wrbuf_vputs, w, q);
+ return solr_transform_rpn2solr_stream(ct, wrbuf_vp_puts, w, q);
}
/*