- if (no == 1)
- return rsisamc_create(rset_nmem, kctrl, scope,
- zi->reg->isamc, *isam_p, termid);
- qsort (isam_p, no, sizeof(*isam_p), isamc_trunc_cmp);
- }
- else if (zi->reg->isamb)
- {
- if (no == 1)
- return rsisamb_create(rset_nmem,kctrl, scope,
- zi->reg->isamb, *isam_p, termid);
- else if (no <10000 ) /* FIXME - hardcoded number */
- {
- RSET r;
- RSET *rsets=xmalloc(no*sizeof(RSET)); /* use nmem! */
- int i;
- for (i=0;i<no;i++)
- rsets[i]=rsisamb_create(rset_nmem, kctrl, scope,
- zi->reg->isamb, isam_p[i], termid);
- r=rsmultior_create( rset_nmem, kctrl, scope, no, rsets);
- xfree(rsets);
- return r;
- }
- qsort (isam_p, no, sizeof(*isam_p), isamc_trunc_cmp);
+ RSET r;
+ RSET *rsets = xmalloc(no*sizeof(RSET)); /* use nmem! */
+ int i;
+ for (i = 0; i<no; i++)
+ rsets[i] = rsisamb_create(rset_nmem, kctrl, scope,
+ zh->reg->isamb, isam_p[i],
+ 0 /* termid */);
+ r = rset_create_or(rset_nmem, kctrl, scope,
+ termid, no, rsets);
+ xfree(rsets);
+ return r;