diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-08 23:47:07 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-08 23:47:07 +0300 |
commit | fe781e5ae7116733e5b335a0ac016af97266db5f (patch) | |
tree | d5cf6ebfc27b84745df5d6e3db04b04d0b524706 /src/actionhelper.c | |
parent | f67f2c3d5b67f54dae2c2c2754f43b4351445c80 (diff) | |
download | ck-fe781e5ae7116733e5b335a0ac016af97266db5f.tar.gz ck-fe781e5ae7116733e5b335a0ac016af97266db5f.tar.bz2 ck-fe781e5ae7116733e5b335a0ac016af97266db5f.zip |
Way better Edit
Diffstat (limited to 'src/actionhelper.c')
-rw-r--r-- | src/actionhelper.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/actionhelper.c b/src/actionhelper.c index 883229f..3e898af 100644 --- a/src/actionhelper.c +++ b/src/actionhelper.c @@ -15,6 +15,9 @@ #include <libgen.h> #include "actionhelper.h" +#include "ckerrlog.h" + +ERRLOG(action); char add_err[STR_M] = ""; @@ -146,11 +149,8 @@ void add_make_link(const AddOpt *opt, const Conf *conf) { } } -edit_rc -edit_get_config_or_suggestions(cklist *args, char *ret) { +int edit_make_options(cklist *args) { UNUSED(args); - UNUSED(ret); - return ERC_ERR; } ListOpt list_make_options(cklist *args) { @@ -210,50 +210,48 @@ ListOpt list_make_options(cklist *args) { void print_INIT_result(int err) { if (!err) { - printf("Initialized empty ckdb.\n"); + HELP("Initialized empty ckdb."); } } void print_ADD_result(int err) { if (!err) { - printf("ckdb updated succesfully.\n"); + HELP("ckdb updated succesfully."); return; } - printf("Could not complete add transaction.\n"); + ERR("Could not complete add transaction."); } void print_DEL_result(int err) { if (!err) { - printf("succes\n"); + HELP("ckdb updated succesfully"); return; } - printf("Not Supported\n"); + ERR("Could not complete delete transaction"); } void print_EDIT_result(int err) { if (!err) { - printf("succes\n"); return; } - printf("failure\n"); } void print_LIST_result(int err) { if (!err) { return; } - printf("Wrong list arguments\n"); + ERR("Wrong list arguments"); } void print_SEARCH_result(int err) { if (err == 2) { - printf("No grep avaliable. Please make sure you have grep installed.\n"); + ERR("No grep avaliable. Please make sure you have grep installed."); return; } if (!err) { return; } - printf("Wrong search.\n"); + ERR("Wrong search."); } void print_HELP_result(int err) { |