X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=para.h;h=5dec070f00458bd59d62fbb8fed1b3bc60cb31da;hp=a580b14c9946bf9d10d1062a49b445e295ba72ff;hb=f07fded9f5645a7ac89e63baf50b895cd3a4a140;hpb=85cc0e3088ce09c02e919be2d9de6be4b40af2c1 diff --git a/para.h b/para.h index a580b14c..5dec070f 100644 --- a/para.h +++ b/para.h @@ -206,5 +206,8 @@ static inline int para_random(unsigned max) return ((max + 0.0) * (rand() / (RAND_MAX + 1.0))); } -/* Round up x to a multiple of y */ +/** Round up x to a multiple of y */ #define ROUND_UP(x, y) (((x) + (y - 1) / (y)) * (y)) + +/** Get the size of an array */ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))