aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-01-30 18:42:27 +0100
committerMattias Andrée <m@maandree.se>2025-01-30 18:42:27 +0100
commitaebf2524909f0c0e3aec7f78fa01ad908f7da3a0 (patch)
tree86881e1b1b299990e6726eda5dde3f1f77c4f180 /common.h
downloadlibenv-aebf2524909f0c0e3aec7f78fa01ad908f7da3a0.tar.gz
libenv-aebf2524909f0c0e3aec7f78fa01ad908f7da3a0.tar.bz2
libenv-aebf2524909f0c0e3aec7f78fa01ad908f7da3a0.tar.xz
First commit
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--common.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..02af2a1
--- /dev/null
+++ b/common.h
@@ -0,0 +1,30 @@
+/* See LICENSE file for copyright and license details. */
+#include "libenv.h"
+#include <stdlib.h>
+
+
+#define HAVE_HEAD 1
+#define NO_HEAD 0
+
+#define NAMES 1
+#define VARIABLES 0
+
+#define FILTER 1, 1
+#define SELECT 0, 0
+
+
+size_t libenv_vprocess_list__(void *, enum libenv_class, va_list, int have_head, int names, int filter, int all, int dealloc);
+
+static inline size_t
+libenv_vprocess_list_without_dealloc__(const char **variables, enum libenv_class classes_head, va_list classes_tail,
+ int have_head, int names, int filter, int all)
+{
+ return libenv_vprocess_list__(variables, classes_head, classes_tail, have_head, names, filter, all, 0);
+}
+
+static inline size_t
+libenv_vprocess_list_with_dealloc__(char **variables, enum libenv_class classes_head, va_list classes_tail,
+ int have_head, int names, int filter, int all)
+{
+ return libenv_vprocess_list__(variables, classes_head, classes_tail, have_head, names, filter, all, 1);
+}