diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 16:54:43 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 16:54:43 +0300 |
commit | 65986f9cd9429c7876e5d2f09e4a0cd19d966fa3 (patch) | |
tree | a77f12361571bd6c89ccd478db3dba2866719df3 /src/actionparser.c | |
parent | 03917439a1ddcf202e9fc53937b10eeb7ec0a99a (diff) | |
download | ck-65986f9cd9429c7876e5d2f09e4a0cd19d966fa3.tar.gz ck-65986f9cd9429c7876e5d2f09e4a0cd19d966fa3.tar.bz2 ck-65986f9cd9429c7876e5d2f09e4a0cd19d966fa3.zip |
Add dummy delete
Diffstat (limited to 'src/actionparser.c')
-rw-r--r-- | src/actionparser.c | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |