From faccaf6112d923533512e1dd868ec4bf0d30e1b5 Mon Sep 17 00:00:00 2001 From: minus Date: Tue, 18 Aug 2015 23:38:34 +0200 Subject: added sway_assert function returns false on a failed assertion in release mode and raises SIGABRT in debug mode --- include/log.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/log.h') diff --git a/include/log.h b/include/log.h index d35b2a54..44f84940 100644 --- a/include/log.h +++ b/include/log.h @@ -1,5 +1,6 @@ #ifndef _SWAY_LOG_H #define _SWAY_LOG_H +#include typedef enum { L_SILENT = 0, @@ -10,7 +11,8 @@ typedef enum { void init_log(int verbosity); void sway_log_colors(int mode); -void sway_log(int verbosity, char* format, ...) __attribute__((format(printf,2,3))); -void sway_abort(char* format, ...)__attribute__((format(printf,1,2))); +void sway_log(int verbosity, const char* format, ...) __attribute__((format(printf,2,3))); +void sway_abort(const char* format, ...) __attribute__((format(printf,1,2))); +bool sway_assert(bool condition, const char* format, ...) __attribute__((format(printf,2,3))); #endif -- cgit v1.2.3