diff options
author | Peter Harris <pharris@opentext.com> | 2010-09-08 14:41:52 -0400 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2010-09-08 14:41:52 -0400 |
commit | 28d39258008fcc8ced84dc6c1dd2644e2c908c87 (patch) | |
tree | ccaae3770e4502324f188362a69e5075d81bc383 /src/xcb_util.c | |
parent | f0565e8f06aadf760a9065a97b8cf5ab9cbd18de (diff) | |
parent | 5e8a7ade2dc8aeeeb8013785ca3f24c6057ae443 (diff) |
Merge branch 'gsoc2010' of git://anongit.freedesktop.org/~chr/libxcb
Diffstat (limited to 'src/xcb_util.c')
-rw-r--r-- | src/xcb_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xcb_util.c b/src/xcb_util.c index 0e3728a..c14d9d5 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -64,6 +64,16 @@ int xcb_popcount(uint32_t mask) 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) { |