aboutsummaryrefslogtreecommitdiffstats
path: root/src/clparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/clparser.h')
-rw-r--r--src/clparser.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/clparser.h b/src/clparser.h
index 9b22b87..f6818fa 100644
--- a/src/clparser.h
+++ b/src/clparser.h
@@ -20,19 +20,20 @@
#include "cklist.h"
-#define CK_ACTIONS \
- X(INIT) \
- X(ADD) \
- X(DEL) \
- X(EDIT) \
- X(LIST) \
- X(SEARCH) \
- X(RESTORE) \
- X(HELP)
+/* NAME | MIN ACCEPTED ARGS | MAX ACCEPTED ARGS */
+#define CK_ACTIONS \
+ X(INIT, 2 , 2) \
+ X(ADD, 2, 4) \
+ X(DEL, 1, 2) \
+ X(EDIT, 1, 2) \
+ X(LIST, 1, 6) \
+ X(SEARCH, 1, 1) \
+ X(RESTORE, 1, 2) \
+ X(HELP, 1, 1)
enum ParseErrors {
PERR_NOERR = 0,
-#define X(ACTION) \
+#define X(ACTION, MIN, MAX) \
PERR_##ACTION##_WRONG,
CK_ACTIONS
#undef X
@@ -42,7 +43,7 @@ typedef enum ParseErrors ParseError;
enum CkActions {
CK_WRONG_ACTION,
-#define X(ACTION) \
+#define X(ACTION, MIN, MAX) \
CKA_##ACTION,
CK_ACTIONS
#undef X