parent
fd91244e83
commit
f4453d104d
@ -1,6 +0,0 @@
|
||||
add_library(wlr-common STATIC
|
||||
list.c
|
||||
log.c
|
||||
)
|
||||
|
||||
target_link_libraries(wlr-common m)
|
@ -1,19 +0,0 @@
|
||||
#ifndef _WLR_COMMON_LOG_H
|
||||
#define _WLR_COMMON_LOG_H
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
typedef enum {
|
||||
L_SILENT = 0,
|
||||
L_ERROR = 1,
|
||||
L_INFO = 2,
|
||||
L_DEBUG = 3,
|
||||
L_LAST,
|
||||
} log_importance_t;
|
||||
|
||||
typedef void (*log_callback_t)(log_importance_t importance, const char *fmt, va_list args);
|
||||
|
||||
void wlr_init_log(log_callback_t callback);
|
||||
void wlr_log_stderr(log_importance_t verbosity, const char *fmt, va_list args);
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
#ifndef _WLR_LIST_H
|
||||
#define _WLR_LIST_H
|
||||
#ifndef _WLR_UTIL_LIST_H
|
||||
#define _WLR_UTIL_LIST_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -1,9 +1,21 @@
|
||||
#ifndef _WLR_INTERNAL_COMMON_LOG_H
|
||||
#define _WLR_INTERNAL_COMMON_LOG_H
|
||||
#ifndef _WLR_UTIL_LOG_H
|
||||
#define _WLR_UTIL_LOG_H
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <wlr/common/log.h>
|
||||
|
||||
typedef enum {
|
||||
L_SILENT = 0,
|
||||
L_ERROR = 1,
|
||||
L_INFO = 2,
|
||||
L_DEBUG = 3,
|
||||
L_LAST,
|
||||
} log_importance_t;
|
||||
|
||||
typedef void (*log_callback_t)(log_importance_t importance, const char *fmt, va_list args);
|
||||
|
||||
void wlr_init_log(log_callback_t callback);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))
|
@ -0,0 +1,6 @@
|
||||
add_library(wlr-util STATIC
|
||||
list.c
|
||||
log.c
|
||||
)
|
||||
|
||||
target_link_libraries(wlr-util m)
|
Loading…
Reference in new issue