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.38 by root, Wed Nov 5 14:43:54 2008 UTC vs.
Revision 1.39 by root, Fri Sep 4 15:40:13 2009 UTC

91 return (T *)rxvt_temp_buf (len * sizeof (T)); 91 return (T *)rxvt_temp_buf (len * sizeof (T));
92} 92}
93 93
94// some bit functions, xft fuck me plenty 94// some bit functions, xft fuck me plenty
95#if HAVE_GCC_BUILTINS 95#if HAVE_GCC_BUILTINS
96/* netbsd stupidly defines popcount itself and puts it into string.h */
96static inline int ctz (unsigned int x) { return __builtin_ctz (x); } 97static inline int rxvt_ctz (unsigned int x) { return __builtin_ctz (x); }
97static inline int popcount (unsigned int x) { return __builtin_popcount (x); } 98static inline int rxvt_popcount (unsigned int x) { return __builtin_popcount (x); }
98#else 99#else
99// count trailing zero bits and count # of one bits 100// count trailing zero bits and count # of one bits
100int ctz (unsigned int x) CONST; 101int rxvt_ctz (unsigned int x) CONST;
101int popcount (unsigned int x) CONST; 102int rxvt_popcount (unsigned int x) CONST;
102#endif 103#endif
103 104
104// in range including end 105// in range including end
105#define IN_RANGE_INC(val,beg,end) \ 106#define IN_RANGE_INC(val,beg,end) \
106 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg)) 107 ((unsigned int)(val) - (unsigned int)(beg) <= (unsigned int)(end) - (unsigned int)(beg))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines