diff options
author | Peter Harris <pharris@opentext.com> | 2010-12-23 13:04:40 -0500 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2010-12-23 13:04:40 -0500 |
commit | 3c5813697169a33ecfd6ac0ab5641dec654f6612 (patch) | |
tree | dbb6ffe70836cbeb54aa7d91386adb9f9a2aeb92 /src/xcb_util.c | |
parent | 69b78ced1a7bcdca538c0720fde9cf3e6f70d040 (diff) | |
parent | b672d1514c88e119f3aaeded8c8a488cad36db52 (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/~peterh/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 63ea751..223dcaf 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -62,6 +62,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) { |