]> mj.ucw.cz Git - libucw.git/commitdiff
Added REV_COMPARE(x,y) which is equivalent to COMPARE(y,x), but it's
authorMartin Mares <mj@ucw.cz>
Sat, 28 Feb 2004 11:03:42 +0000 (11:03 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 28 Feb 2004 11:03:42 +0000 (11:03 +0000)
better readable to use both of them instead of swapping the arguments.

lib/lib.h

index 0b50314f26ae28fb4e7c20d799a871083a4ed3a3..a36b5be6341537c7e41e168293a0391f54847dc5 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -40,6 +40,7 @@
 #define GLUE(x,y) x##y
 #define GLUE_(x,y) x##_##y
 #define COMPARE(x,y) do { if ((x)<(y)) return -1; if ((x)>(y)) return 1; } while(0)
+#define REV_COMPARE(x,y) COMPARE(y,x)
 
 /* Logging */