aboutsummaryrefslogtreecommitdiff
path: root/src/hotkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hotkey.c')
-rw-r--r--src/hotkey.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/hotkey.c b/src/hotkey.c
index 9b6b85a..780aa3a 100644
--- a/src/hotkey.c
+++ b/src/hotkey.c
@@ -74,7 +74,7 @@ unsigned long hash_hotkey(struct hotkey *a)
return a->key;
}
-bool same_mode(char *a, char *b)
+bool compare_string(char *a, char *b)
{
while (*a && *b && *a == *b) {
++a;
@@ -83,7 +83,7 @@ bool same_mode(char *a, char *b)
return *a == '\0' && *b == '\0';
}
-unsigned long hash_mode(char *key)
+unsigned long hash_string(char *key)
{
unsigned long hash = 0, high;
while(*key) {
@@ -228,6 +228,16 @@ next:;
}
}
+void free_blacklist(struct table *blacklst)
+{
+ int count;
+ void **items = table_reset(blacklst, &count);
+ for (int index = 0; index < count; ++index) {
+ char *item = (char *) items[index];
+ free(item);
+ }
+}
+
internal void
cgevent_lrmod_flag_to_hotkey_lrmod_flag(CGEventFlags eventflags, uint32_t *flags, int mod)
{