diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 14:41:53 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 14:41:53 +0200 |
commit | 5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (patch) | |
tree | 684758441f5b431d0008253243034b6a4a29417c /include/logmsg.h | |
parent | 249866e3d1e11dc72eaa1305f4bb479ded92ef38 (diff) |
initial clang-format
Diffstat (limited to 'include/logmsg.h')
-rw-r--r-- | include/logmsg.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/logmsg.h b/include/logmsg.h index c480c8b..2f47a94 100644 --- a/include/logmsg.h +++ b/include/logmsg.h @@ -3,29 +3,29 @@ #include <errno.h> #include <stdlib.h> + #include "error.h" -extern void logmsg(const char *who, int ecode, unsigned int class, - const char *msg); +extern void logmsg(const char *who, int ecode, unsigned int class, const char *msg); /* useful combinations of params */ /* class: FATAL (hard) - system error */ -#define err_sys(w,e) logmsg(w,e,FATAL,"") -#define err_sys_plus(w,e,m) logmsg(w,e,FATAL,m) +#define err_sys(w, e) logmsg(w, e, FATAL, "") +#define err_sys_plus(w, e, m) logmsg(w, e, FATAL, m) /* class: WARN (application) - temporary error */ -#define err_tmp(w,e,m) logmsg(w,e,WARN,m) -#define err_tmp_plus(w,e,m) logmsg(w,e,WARN,m) +#define err_tmp(w, e, m) logmsg(w, e, WARN, m) +#define err_tmp_plus(w, e, m) logmsg(w, e, WARN, m) /* class: facultative ('int'ernal definition */ -#define err_int(w,e,c) logmsg(w,e,c,"") -#define err_int_plus(w,e,c,m) logmsg(w,e,c,m) +#define err_int(w, e, c) logmsg(w, e, c, "") +#define err_int_plus(w, e, c, m) logmsg(w, e, c, m) /* log messages */ /* #define log(w,m) logmsg(w,0,LOG,m) // obsoleted by */ -#define log_who(w,m) logmsg(w,0,LOG,m) -#define log_anon(m) logmsg("",0,LOG,m) -#define log_cat(n) logmsg("",0,CAT,m) +#define log_who(w, m) logmsg(w, 0, LOG, m) +#define log_anon(m) logmsg("", 0, LOG, m) +#define log_cat(n) logmsg("", 0, CAT, m) /* build log message from multiple partial strings */ extern char *build_log_msg(const char *[]); -#define B(...) build_log_msg((const char *[]){__VA_ARGS__,NULL}) // K/R sect. 7.3 +#define B(...) build_log_msg((const char *[]){__VA_ARGS__, NULL}) // K/R sect. 7.3 #endif |