projects
/
free-sw
/
xcb
/
libxcb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added accessors for special cases
[free-sw/xcb/libxcb]
/
src
/
xcb_util.c
diff --git
a/src/xcb_util.c
b/src/xcb_util.c
index
8c2a031
..
58bd12d
100644
(file)
--- a/
src/xcb_util.c
+++ b/
src/xcb_util.c
@@
-59,6
+59,16
@@
int xcb_popcount(uint32_t mask)
return ((y + (y >> 3)) & 030707070707) % 077;
}
return ((y + (y >> 3)) & 030707070707) % 077;
}
+int xcb_sumof(uint8_t *list, int len)
+{
+ int i, s = 0;
+ for(i=0; i<len; i++) {
+ s += *list;
+ list++;
+ }
+ return s;
+}
+
static int _xcb_parse_display(const char *name, char **host, char **protocol,
int *displayp, int *screenp)
{
static int _xcb_parse_display(const char *name, char **host, char **protocol,
int *displayp, int *screenp)
{