aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/util/array.h17
-rw-r--r--include/util/set.h25
2 files changed, 25 insertions, 17 deletions
diff --git a/include/util/array.h b/include/util/array.h
index 2b7278cc..a51bdb64 100644
--- a/include/util/array.h
+++ b/include/util/array.h
@@ -1,27 +1,10 @@
#ifndef UTIL_ARRAY_H
#define UTIL_ARRAY_H
-#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <wayland-util.h>
-size_t push_zeroes_to_end(uint32_t arr[], size_t n);
-
-/**
- * Add `target` to `values` if it doesn't exist
- * "set"s should only be modified with set_* functions
- * Values MUST be greater than 0
- */
-bool set_add(uint32_t values[], size_t *len, size_t cap, uint32_t target);
-
-/**
- * Remove `target` from `values` if it exists
- * "set"s should only be modified with set_* functions
- * Values MUST be greater than 0
- */
-bool set_remove(uint32_t values[], size_t *len, size_t cap, uint32_t target);
-
/**
* Remove a chunk of memory of the specified size at the specified offset.
*/
diff --git a/include/util/set.h b/include/util/set.h
new file mode 100644
index 00000000..41099621
--- /dev/null
+++ b/include/util/set.h
@@ -0,0 +1,25 @@
+#ifndef UTIL_SET_H
+#define UTIL_SET_H
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+size_t push_zeroes_to_end(uint32_t arr[], size_t n);
+
+/**
+ * Add `target` to `values` if it doesn't exist
+ * "set"s should only be modified with set_* functions
+ * Values MUST be greater than 0
+ */
+bool set_add(uint32_t values[], size_t *len, size_t cap, uint32_t target);
+
+/**
+ * Remove `target` from `values` if it exists
+ * "set"s should only be modified with set_* functions
+ * Values MUST be greater than 0
+ */
+bool set_remove(uint32_t values[], size_t *len, size_t cap, uint32_t target);
+
+#endif
+