/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
const char *split_op = 0;
const char *ccl_rel = 0;
const char *rel = cn->u.st.relation;
- const char *cp;
if (cn->u.st.index && strcmp(cn->u.st.index,
"cql.serverChoice"))
/* unsupported relation */
return -1;
}
- cp = cn->u.st.term;
- while (1)
+ for (; cn; cn = cn->u.st.extra_terms)
{
- if (ccl_field && ccl_rel)
+ const char *cp = cn->u.st.term;
+ while (1)
{
- pr(ccl_field, client_data);
- pr(ccl_rel, client_data);
- if (!split_op)
- ccl_rel = 0;
+ if (ccl_field && ccl_rel)
+ {
+ pr(ccl_field, client_data);
+ pr(ccl_rel, client_data);
+ if (!split_op)
+ ccl_rel = 0;
+ }
+ pr_term(&cp, split_op ? 1 : 0, pr, client_data);
+ while (*cp == ' ')
+ cp++;
+ if (*cp == '\0')
+ break;
+ pr(" ", client_data);
+ if (split_op)
+ {
+ pr(split_op, client_data);
+ pr(" ", client_data);
+ }
}
- pr_term(&cp, split_op ? 1 : 0, pr, client_data);
- while (*cp == ' ')
- cp++;
- if (*cp == '\0')
- break;
- pr(" ", client_data);
- if (split_op)
+ if (cn->u.st.extra_terms)
{
- pr(split_op, client_data);
pr(" ", client_data);
+ if (split_op)
+ {
+ pr(split_op, client_data);
+ pr(" ", client_data);
+ }
}
}
return 0;