[llvm-commits] CVS: llvm/test/Libraries/libc/qsort.c

Misha Brukman brukman at cs.uiuc.edu
Thu May 29 17:13:01 PDT 2003


Changes in directory llvm/test/Libraries/libc:

qsort.c updated: 1.1 -> 1.2

---
Log message:

Prevent lines from wrapping.


---
Diffs of the changes:

Index: llvm/test/Libraries/libc/qsort.c
diff -u llvm/test/Libraries/libc/qsort.c:1.1 llvm/test/Libraries/libc/qsort.c:1.2
--- llvm/test/Libraries/libc/qsort.c:1.1	Thu May 29 15:24:54 2003
+++ llvm/test/Libraries/libc/qsort.c	Thu May 29 17:12:35 2003
@@ -28,17 +28,17 @@
 #include <string.h>
 
 /* Byte-wise swap two items of size SIZE. */
-#define SWAP(a, b, size)                                                      \
-  do                                                                          \
-    {                                                                         \
-      register size_t __size = (size);                                        \
-      register char *__a = (a), *__b = (b);                                   \
-      do                                                                      \
-        {                                                                      \
-          char __tmp = *__a;                                                      \
-          *__a++ = *__b;                                                      \
-          *__b++ = __tmp;                                                      \
-        } while (--__size > 0);                                                      \
+#define SWAP(a, b, size)                        \
+  do                                            \
+    {                                           \
+      register size_t __size = (size);          \
+      register char *__a = (a), *__b = (b);     \
+      do                                        \
+        {                                       \
+          char __tmp = *__a;                    \
+          *__a++ = *__b;                        \
+          *__b++ = __tmp;                       \
+        } while (--__size > 0);                 \
     } while (0)
 
 /* Discontinue quicksort algorithm when partition gets below this size.
@@ -59,8 +59,8 @@
    bits per byte (CHAR_BIT) * sizeof(size_t).  */
 #define STACK_SIZE      (CHAR_BIT * sizeof(size_t))
 #define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
-#define POP(low, high)        ((void) (--top, (low = top->lo), (high = top->hi)))
-#define STACK_NOT_EMPTY        (stack < top)
+#define POP(low, high)  ((void) (--top, (low = top->lo), (high = top->hi)))
+#define STACK_NOT_EMPTY  (stack < top)
 
 
 /* Order size using quicksort.  This implementation incorporates





More information about the llvm-commits mailing list