diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-05 18:16:16 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-05 19:36:11 +0300 |
commit | a0db476bed7d7b814c426d23b55a74d585a6d8cb (patch) | |
tree | ffde1fae7d75701e7dba31cf53077a9ca21b3a53 /src/ck.c | |
parent | 764a205fe9676afcdb94998b5e553d650bda86ba (diff) | |
download | ck-a0db476bed7d7b814c426d23b55a74d585a6d8cb.tar.gz ck-a0db476bed7d7b814c426d23b55a74d585a6d8cb.tar.bz2 ck-a0db476bed7d7b814c426d23b55a74d585a6d8cb.zip |
errlog in actionparser and configparser
Diffstat (limited to 'src/ck.c')
-rw-r--r-- | src/ck.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -35,21 +35,16 @@ #include "ckerrlog.h" int main(int argc, char *argv[]) { - initialize_errlog(); + initialize_errlog(argc, argv); UserOpt opt; Conf conf = {.vc_dir = NULL, .scrt_dir = NULL}; /* get user opt */ - switch(parse_action(argc, argv, &opt)) { - case APR_HELP: - print_parser_help(); + int rc = parse_action(argc, argv, &opt); + if (rc < 0) { goto error; - case APR_ERR: - print_parser_error(&opt); - goto error; - case APR_VERSION: + } + else if (rc == 1) { goto close; - case APR_OK: - break; } /* If the action is init don't load the config, skip to running init*/ |