sway/include/log.h

17 lines
578 B
C
Raw Normal View History

#ifndef _SWAY_LOG_H
#define _SWAY_LOG_H
#include <stdbool.h>
2018-01-05 21:32:51 +00:00
#include <wlr/util/log.h>
2017-04-20 16:13:53 +00:00
void _sway_abort(const char *filename, int line, const char* format, ...) __attribute__((format(printf,3,4)));
#define sway_abort(FMT, ...) \
_sway_abort(__FILE__, __LINE__, FMT, ##__VA_ARGS__)
2015-08-26 18:01:26 +00:00
2017-04-16 09:07:43 +00:00
bool _sway_assert(bool condition, const char *filename, int line, const char* format, ...) __attribute__((format(printf,4,5)));
2015-08-26 18:01:26 +00:00
#define sway_assert(COND, FMT, ...) \
2017-04-16 09:07:43 +00:00
_sway_assert(COND, __FILE__, __LINE__, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__)
2015-08-26 18:01:26 +00:00
2015-08-24 20:44:58 +00:00
void error_handler(int sig);
#endif