ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtutil.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtutil.h (file contents):
Revision 1.11 by root, Tue Dec 20 19:30:59 2005 UTC vs.
Revision 1.12 by root, Wed Dec 21 10:34:24 2005 UTC

16 16
17template<typename T, typename U> 17template<typename T, typename U>
18static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } 18static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
19template<typename T, typename U> 19template<typename T, typename U>
20static inline T max (T a, U b) { return a > (T)b ? a : (T)b; } 20static inline T max (T a, U b) { return a > (T)b ? a : (T)b; }
21template<typename T, typename U, typename V>
22static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; }
21template<typename T> 23template<typename T, typename U>
22static inline void swap (T& a, T& b) { T t=a; a=b; b=t; } 24static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; }
23 25
24// in range including end 26// in range including end
25#define IN_RANGE_INC(val,beg,end) \ 27#define IN_RANGE_INC(val,beg,end) \
26 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg)) 28 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg))
27 29

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines