From 65986f9cd9429c7876e5d2f09e4a0cd19d966fa3 Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 27 Sep 2018 16:54:43 +0300 Subject: Add dummy delete --- src/actionparser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/actionparser.c') diff --git a/src/actionparser.c b/src/actionparser.c index 0057e7f..82ae25e 100644 --- a/src/actionparser.c +++ b/src/actionparser.c @@ -100,7 +100,15 @@ int parse_ADD(UserOpt *opt) { } int parse_DEL(UserOpt *opt) { - return -1; + /* DEL expects 1 to 2 arguments */ + if (optNum <= pos || optNum > pos + 2) { + opt->err = PERR_DEL_WRONG; + return -1; + } + + int arg_num = optNum - pos; + fill_args_list(arg_num, opt); + return 1; } int parse_EDIT(UserOpt *opt) { -- cgit v1.2.3