diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-18 17:44:00 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-18 17:44:00 -0400 |
commit | 443ae9b89e9e1534407c2dd273a4e47ddb3610c7 (patch) | |
tree | 174fb2183b500ef9f622dab0cff43d7616730016 /include | |
parent | More patches for wlc compat (diff) | |
parent | added sway_assert function (diff) | |
download | sway-443ae9b89e9e1534407c2dd273a4e47ddb3610c7.tar.gz sway-443ae9b89e9e1534407c2dd273a4e47ddb3610c7.tar.zst sway-443ae9b89e9e1534407c2dd273a4e47ddb3610c7.zip |
Merge pull request #72 from minus7/assert
added sway_assert function
Diffstat (limited to 'include')
-rw-r--r-- | include/log.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 @@ | |||
1 | #ifndef _SWAY_LOG_H | 1 | #ifndef _SWAY_LOG_H |
2 | #define _SWAY_LOG_H | 2 | #define _SWAY_LOG_H |
3 | #include <stdbool.h> | ||
3 | 4 | ||
4 | typedef enum { | 5 | typedef enum { |
5 | L_SILENT = 0, | 6 | L_SILENT = 0, |
@@ -10,7 +11,8 @@ typedef enum { | |||
10 | 11 | ||
11 | void init_log(int verbosity); | 12 | void init_log(int verbosity); |
12 | void sway_log_colors(int mode); | 13 | void sway_log_colors(int mode); |
13 | void sway_log(int verbosity, char* format, ...) __attribute__((format(printf,2,3))); | 14 | void sway_log(int verbosity, const char* format, ...) __attribute__((format(printf,2,3))); |
14 | void sway_abort(char* format, ...)__attribute__((format(printf,1,2))); | 15 | void sway_abort(const char* format, ...) __attribute__((format(printf,1,2))); |
16 | bool sway_assert(bool condition, const char* format, ...) __attribute__((format(printf,2,3))); | ||
15 | 17 | ||
16 | #endif | 18 | #endif |