--- rxvt-unicode/src/rxvtutil.h 2006/01/02 15:35:43 1.15 +++ rxvt-unicode/src/rxvtutil.h 2006/01/12 00:35:39 1.17 @@ -19,6 +19,7 @@ static bool vax () { return e == 0x44332211; }; } byteorder; +// various utility functions template static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } template static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; } template static inline T max (T a, U b) { return a > (T)b ? a : (T)b; } @@ -37,6 +38,7 @@ #define IN_RANGE_EXC(val,beg,end) \ ((unsigned int)(val) - (unsigned int)(beg) < (unsigned int)(end) - (unsigned int)(beg)) +// makes dynamically allocated objects zero-initialised struct zero_initialized { void *operator new (size_t s); void operator delete (void *p, size_t s);