- MatchingRule *mr = ad->ad_type->sat_equality;
- int istack[sizeof(int)*16];
- int i, j, k, l, ir, jstack, match, *ix, itmp;
- struct berval a, *cv;
-
-/* If PRESERVE_ORDER is defined only the index array is sorted; the
- * actual values are left in their incoming order. Otherwise, the
- * only reason to keep the index array is to identify the offending
- * value when duplicates are found.
- */
-#define PRESERVE_ORDER
-#ifndef PRESERVE_ORDER
- struct berval va, *v, *nv, bvtmp;
-
-#define IX(x) x
-#define EXCH(x,y) SWAP(ix[x],ix[y],itmp); SWAP(cv[x],cv[y],bvtmp); \
- if (nv) {SWAP(v[x],v[y],bvtmp);}
-#define SETA(x) itmp = ix[x]; a = cv[x]; if (nv) va=v[x]
-#define GETA(x) ix[x] = itmp; cv[x] = a; if (nv) v[x]=va
-#define SET(x,y) ix[x] = ix[y]; cv[x] = cv[y]; if (nv) v[x]=v[y]
-
- v = ml->sml_values;
- nv = ml->sml_nvalues;
-
-#else /* PRESERVE_ORDER */
-