aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 9680e8d..5f09c07 100644
--- a/src/common.h
+++ b/src/common.h
@@ -65,7 +65,20 @@ struct Command {
char* description;
};
-void print_help(const struct Command*, size_t);
+enum flag_variants {
+ SINGLE = 1,
+ DOUBLE = 2,
+ BOTH = SINGLE + DOUBLE
+};
+
+struct Flag {
+ char* name;
+ enum flag_variants variant;
+ int (*func)(int, char**);
+ char* description;
+};
+
+void print_help(const struct Command*, size_t, const struct Flag*, size_t);
struct stat getStat(const char* path);
int isFile(const char*);