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.13 by root, Wed Dec 21 14:19:19 2005 UTC

12 static bool network () { return e == 0x11223344; }; 12 static bool network () { return e == 0x11223344; };
13 static bool little_endian () { return e == 0x44332211; }; 13 static bool little_endian () { return e == 0x44332211; };
14 static bool vax () { return e == 0x44332211; }; 14 static bool vax () { return e == 0x44332211; };
15} byteorder; 15} byteorder;
16 16
17template<typename T, typename U> static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
18template<typename T, typename U> static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; }
19template<typename T, typename U> static inline T max (T a, U b) { return a > (T)b ? a : (T)b; }
20template<typename T, typename U> static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; }
21
22template<typename T, typename U, typename V> static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; }
23template<typename T, typename U, typename V> static inline void clamp_it (T &v, U a, V b) { v = v < (T)a ? a : v >(T)b ? b : v; }
24
17template<typename T, typename U> 25template<typename T, typename U>
18static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
19template<typename T, typename U>
20static inline T max (T a, U b) { return a > (T)b ? a : (T)b; }
21template<typename T>
22static inline void swap (T& a, T& b) { T t=a; a=b; b=t; } 26static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; }
23 27
24// in range including end 28// in range including end
25#define IN_RANGE_INC(val,beg,end) \ 29#define IN_RANGE_INC(val,beg,end) \
26 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg)) 30 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg))
27 31

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines