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.12 by root, Wed Dec 21 10:34:24 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>
18static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } 17template<typename T, typename U> static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
19template<typename T, typename U> 18template<typename T, typename U> static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; }
20static inline T max (T a, U b) { return 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; }
21template<typename T, typename U, typename V> 20template<typename T, typename U> static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; }
21
22static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; } 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
23template<typename T, typename U> 25template<typename T, typename U>
24static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; } 26static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; }
25 27
26// in range including end 28// in range including end
27#define IN_RANGE_INC(val,beg,end) \ 29#define IN_RANGE_INC(val,beg,end) \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines