summaryrefslogtreecommitdiff
path: root/lib/args.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/args.h')
-rw-r--r--lib/args.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/args.h b/lib/args.h
new file mode 100644
index 0000000..0b89fca
--- /dev/null
+++ b/lib/args.h
@@ -0,0 +1,18 @@
+#ifndef ARGS_H
+#define ARGS_H
+
+#define UNUSED(x) (void)(x)
+#define ARG_UNUSED 0
+#define ARG_USED 1
+#define ARG_IGNORE 2
+#define ARG_INVALID 3
+
+void check_arg (char* arg);
+
+void global_help(void (*help)(void));
+
+void parse_help (int argc, char** argv, void (*help)(void));
+
+int parse_args (int argc, char** argv, void (*help)(void), int (*short_arg)(char, char*), int (*long_arg)(char*, char*));
+
+#endif