diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-04 15:46:42 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-04 15:46:42 +0300 |
commit | 9c24e438b689af042672182f6d87f824ef435492 (patch) | |
tree | 9f91c4951bd2e4a799868b0a3369161918045a6e /src/ckerrlog.h | |
parent | fa41863b03bbf67a7ad4edad9328b0cdc48e497b (diff) | |
download | ck-9c24e438b689af042672182f6d87f824ef435492.tar.gz ck-9c24e438b689af042672182f6d87f824ef435492.tar.bz2 ck-9c24e438b689af042672182f6d87f824ef435492.zip |
More error/logs and fix failing test
Diffstat (limited to 'src/ckerrlog.h')
-rw-r--r-- | src/ckerrlog.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/ckerrlog.h b/src/ckerrlog.h index b254d4b..be5257d 100644 --- a/src/ckerrlog.h +++ b/src/ckerrlog.h @@ -18,23 +18,26 @@ #define CK_STREAMS \ X(err) \ - X(log) + X(log) \ + X(help) void ckerr_add_component(char *txt, ...); -#define ERR(...) \ - ckerr_add_component("-[%s]", COMPONENT); \ - ckerr(__VA_ARGS__); - -typedef struct st_ErrLog ErrLog; -struct st_ErrLog { - char *err; - char *log; -}; - extern void initialize_errlog(); extern void report_errlog(); extern void ckerr(char *err, ...); extern void cklog(char *log, ...); +extern void ckhelp(char *log, ...); +extern void report_err(); +extern void report_help(); + +/**********/ +/* Macros */ +/**********/ + +#define ERR(...) \ + ckerr_add_component("Error in [%s]:", COMPONENT); \ + ckerr(__VA_ARGS__); \ + report_err(); #endif /* CKERRLOG_H */ |