summaryrefslogtreecommitdiffstats
path: root/strlist.h
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-02-28 00:35:15 +0000
committerTomasz Kramkowski <tk@the-tk.com>2018-03-01 11:48:15 +0000
commit364eea8654a69dd0e79cdfa86c10992e6e275ccd (patch)
treeb771e8ced2e4d0a4a0a8822bc49a6316cc14fd8b /strlist.h
downloadvulkan-364eea8654a69dd0e79cdfa86c10992e6e275ccd.tar.gz
vulkan-364eea8654a69dd0e79cdfa86c10992e6e275ccd.tar.xz
vulkan-364eea8654a69dd0e79cdfa86c10992e6e275ccd.zip
init commit
Diffstat (limited to 'strlist.h')
-rw-r--r--strlist.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/strlist.h b/strlist.h
new file mode 100644
index 0000000..6c60a79
--- /dev/null
+++ b/strlist.h
@@ -0,0 +1,16 @@
+#ifndef VULKAN_STRLIST_H
+#define VULKAN_STRLIST_H
+
+struct strlist {
+ const char **list;
+ int count;
+};
+
+void sl_append(struct strlist *sl, const char **strs, int nstrs);
+static inline void sl_append1(struct strlist *sl, const char *str)
+{
+ sl_append(sl, &str, 1);
+}
+void sl_free(struct strlist *sl);
+
+#endif // VULKAN_STRLIST_H