dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

util.h (500B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 #ifndef MAX
      4 #define MAX(A, B)               ((A) > (B) ? (A) : (B))
      5 #endif
      6 #ifndef MIN
      7 #define MIN(A, B)               ((A) < (B) ? (A) : (B))
      8 #endif
      9 #define BETWEEN(X, A, B)        ((A) <= (X) && (X) <= (B))
     10 #define LENGTH(X)               (sizeof (X) / sizeof (X)[0])
     11 
     12 #ifdef _DEBUG
     13 #define DEBUG(...) fprintf(stderr, __VA_ARGS__)
     14 #else
     15 #define DEBUG(...)
     16 #endif
     17 
     18 void die(const char *fmt, ...);
     19 void *ecalloc(size_t nmemb, size_t size);
     20