From: ayin Date: Fri, 14 Dec 2007 11:11:31 +0000 (+0000) Subject: Move MOD macro to rxvtutil.h. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d66455c5b16bb168bd5c85aa73304d4abc129301;p=dana%2Furxvt.git Move MOD macro to rxvtutil.h. --- diff --git a/src/rxvt.h b/src/rxvt.h index 40079871..fc154747 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -657,9 +657,6 @@ typedef struct _mwmhints { #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) -// for m >= -n, ensure remainder lies between 0..n-1 -#define MOD(m,n) (((m) + (n)) % (n)) - #define LINENO(n) MOD (term_start + int(n), total_rows) #define ROW(n) row_buf [LINENO (n)] diff --git a/src/rxvtutil.h b/src/rxvtutil.h index 64ff670a..43f48fa0 100644 --- a/src/rxvtutil.h +++ b/src/rxvtutil.h @@ -101,6 +101,9 @@ int popcount (unsigned int x) CONST; #define IN_RANGE_EXC(val,beg,end) \ ((unsigned int)(val) - (unsigned int)(beg) < (unsigned int)(end) - (unsigned int)(beg)) +// for m >= -n, ensure remainder lies between 0..n-1 +#define MOD(m,n) (((m) + (n)) % (n)) + // makes dynamically allocated objects zero-initialised struct zero_initialized { void *operator new (size_t s);