--- rxvt-unicode/src/rxvtutil.h 2007/12/02 22:36:42 1.33 +++ rxvt-unicode/src/rxvtutil.h 2007/12/14 11:11:31 1.36 @@ -101,6 +101,9 @@ #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); @@ -364,7 +367,8 @@ template struct vector : simplevec -{ }; +{ +}; struct stringvec : simplevec { @@ -375,6 +379,7 @@ } }; +#if 0 template struct rxvt_vec : simplevec { typedef T *iterator; @@ -388,6 +393,7 @@ T &operator [] (int i) { return * (T *) (& ((* (simplevec *)this)[i])); } const T &operator [] (int i) const { return * (const T *) (& ((* (const simplevec *)this)[i])); } }; +#endif template struct auto_ptr {