*** /tmp/,RCSt1a15217 Fri Aug 25 00:06:33 1989 --- qsort.c Thu Aug 24 23:50:59 1989 *************** *** 178,183 **** --- 178,184 ---- { if(num < 2) return; /* nothing to do */ + #if 0 else if(num == 2) /* at some point replace if n < THRESH do insert sort */ { /* degenerate case */ if(((*cmp)( base, ((uchar *)base)+size )) > 0) *************** *** 189,194 **** --- 190,196 ---- } return; } + #endif #ifdef SHORT_ALIGN_DESIRABLE /* assumption: if short align desired, then its ok to align a long at a short boundary too. *************** *** 196,212 **** if(SHORT_ALIGNED(base)) { if(size == 2) ! _wqsort((ushort *)base, 0, num-1, cmp); else if(size == 4) ! _lqsort((ulong *)base, 0, num-1, cmp); } #else if((size == 4) && LONG_ALIGNED(base)) ! _lqsort((ulong *)base, 0, num-1, cmp); #endif else { if((_qbuf = alloca(size)) == (void *)0) return; ! _nqsort((uchar *)base, 0, num-1, size, cmp); } } --- 198,214 ---- if(SHORT_ALIGNED(base)) { if(size == 2) ! _wqsort((ushort *)base, 0L, num-1, cmp); else if(size == 4) ! _lqsort((ulong *)base, 0L, num-1, cmp); } #else if((size == 4) && LONG_ALIGNED(base)) ! _lqsort((ulong *)base, 0L, num-1, cmp); #endif else { if((_qbuf = alloca(size)) == (void *)0) return; ! _nqsort((uchar *)base, 0L, num-1, size, cmp); } }