+ if (zebraExplain_lookup_ord(zh->reg->zei, sort_criteria[i].ord,
+ &sort_criteria[i].index_type,
+ 0, 0))
+ {
+ zebra_setError(zh, YAZ_BIB1_CANNOT_SORT_ACCORDING_TO_SEQUENCE, 0);
+ return ZEBRA_FAIL;
+ }
+ }
+ /* allocate space for each cmpare buf + one extra for tmp comparison */
+ for (i = 0; i<num_criteria; i++)
+ {
+ cmp_buf[i] = xmalloc(sset->sort_info->max_entries
+ * SORT_IDX_ENTRYSIZE);
+ tmp_cmp_buf[i] = xmalloc(SORT_IDX_ENTRYSIZE);