]> mj.ucw.cz Git - libucw.git/blobdiff - lib/arraysort.h
Merged obj2buck.h and buck2obj.h to object.h, the number of includes
[libucw.git] / lib / arraysort.h
index 3f9d2a18529a8fd25cbc3c33261a3f7e6c031766..b47fa8c38ac5287142608e50b7ea713f43da8994 100644 (file)
@@ -100,7 +100,7 @@ static void ASORT_PREFIX(sort)(uns array_size ASORT_EXTRA_ARGS)
            }
        }
       while (l <= r);
-      if ((r - left) > ASORT_THRESHOLD && (right - l) > ASORT_THRESHOLD)
+      if ((r - left) >= ASORT_THRESHOLD && (right - l) >= ASORT_THRESHOLD)
        {
          /* Both partitions ok => push the larger one */
          if ((r - left) > (right - l))
@@ -117,12 +117,12 @@ static void ASORT_PREFIX(sort)(uns array_size ASORT_EXTRA_ARGS)
            }
          sp++;
        }
-      else if ((r - left) > ASORT_THRESHOLD)
+      else if ((r - left) >= ASORT_THRESHOLD)
        {
          /* Left partition OK, right undersize */
          right = r;
        }
-      else if ((right - l) > ASORT_THRESHOLD)
+      else if ((right - l) >= ASORT_THRESHOLD)
        {
          /* Right partition OK, left undersize */
          left = l;
@@ -166,9 +166,9 @@ static void ASORT_PREFIX(sort)(uns array_size ASORT_EXTRA_ARGS)
 }
 
 #undef ASORT_PREFIX
-#undef ASORT_TYPE
+#undef ASORT_KEY_TYPE
 #undef ASORT_ELT
-#undef ASORT_EQ
+#undef ASORT_LT
 #undef ASORT_SWAP
 #undef ASORT_THRESHOLD
 #undef ASORT_EXTRA_ARGS