projects
/
retrobench
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
override redirect, obey ximage rgb masks, restore completion event
[retrobench]
/
src
/
util.c
diff --git a/src/util.c
b/src/util.c
new file mode 100644
(file)
index 0000000..
82a8bfc
--- /dev/null
+++ b/
src/util.c
@@ -0,0
+1,13
@@
+#include "util.h"
+
+int mask_to_shift(unsigned int mask)
+{
+ int s = 0;
+ if(mask) {
+ while(!(mask & 1)) {
+ mask >>= 1;
+ s++;
+ }
+ }
+ return s;
+}