From 9c24e438b689af042672182f6d87f824ef435492 Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Thu, 4 Oct 2018 15:46:42 +0300 Subject: More error/logs and fix failing test --- src/ckerrlog.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/ckerrlog.h') 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 */ -- cgit v1.2.3