api: add remaining functions
[libc-test] / src / api / wordexp.c
diff --git a/src/api/wordexp.c b/src/api/wordexp.c
new file mode 100644 (file)
index 0000000..5f89956
--- /dev/null
@@ -0,0 +1,27 @@
+#include <wordexp.h>
+#define T(t) (t*)0;
+#define F(t,n) {t *y = &x.n;}
+#define C(n) switch(n){case n:;}
+static void f()
+{
+T(size_t)
+{
+wordexp_t x;
+F(size_t, we_wordc)
+F(char **,we_wordv)
+F(size_t, we_offs)
+}
+C(WRDE_APPEND)
+C(WRDE_DOOFFS)
+C(WRDE_NOCMD)
+C(WRDE_REUSE)
+C(WRDE_SHOWERR)
+C(WRDE_UNDEF)
+C(WRDE_BADCHAR)
+C(WRDE_BADVAL)
+C(WRDE_CMDSUB)
+C(WRDE_NOSPACE)
+C(WRDE_SYNTAX)
+int(*p_wordexp)(const char*restrict,wordexp_t*restrict,int) = wordexp;
+void(*p_wordfree)(wordexp_t*) = wordfree;
+}