From: Martin Mares Date: Sun, 15 Feb 2004 18:25:25 +0000 (+0000) Subject: Introduced COMPARE macro for use in sorter callbacks. X-Git-Tag: holmes-import~1118 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8dbbd028b76f4813817ab89367bb182a9d6e82f9;p=libucw.git Introduced COMPARE macro for use in sorter callbacks. --- diff --git a/lib/lib.h b/lib/lib.h index 923afca5..b737c677 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -39,6 +39,7 @@ #define STRINGIFY(x) #x #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) /* Logging */