diff --git a/MapReader.cpp b/MapReader.cpp index aa86f32..02e9715 100644 --- a/MapReader.cpp +++ b/MapReader.cpp @@ -105,8 +105,10 @@ void MapReader::LoadMap(const char *filename,EventMapping *map) i = 0; - while(i */ +#include #include #include #include #include #include #include +#include #define SYSFS_HIDRAW_CLASS_PATH "/sys/class/hidraw" diff --git a/include/log.h b/include/log.h index 39c58e4..3358e74 100644 --- a/include/log.h +++ b/include/log.h @@ -33,8 +33,8 @@ typedef enum LogLevel { extern int currentLogLevel; -void log(LogLevel severity, const char* fmt, va_list args); -//void log(LogLevel severity, const char* fmt, ...); +void logmsg(LogLevel severity, const char* fmt, va_list args); +//void logmsg(LogLevel severity, const char* fmt, ...); void info(const char* fmt, ...); void warn(const char* fmt, ...); diff --git a/log.cpp b/log.cpp index 8325447..a834abc 100644 --- a/log.cpp +++ b/log.cpp @@ -28,18 +28,18 @@ const char* headers[] = { "ERRO", }; -void log(LogLevel severity, const char* fmt, va_list args) { +void logmsg(LogLevel severity, const char* fmt, va_list args) { if (severity < currentLogLevel) { vfprintf(stderr, fmt, args); putc('\n', stderr); } } -void log(LogLevel severity, const char* fmt, ...) +void logmsg(LogLevel severity, const char* fmt, ...) { va_list args; va_start(args, fmt); - log(severity, fmt, args); + logmsg(severity, fmt, args); va_end(args); } @@ -48,7 +48,7 @@ void info(const char* fmt, ...) { va_list args; va_start(args, fmt); - log(LOG_INFO, fmt, args); + logmsg(LOG_INFO, fmt, args); va_end(args); } @@ -56,7 +56,7 @@ void warn(const char* fmt, ...) { va_list args; va_start(args, fmt); - log(LOG_WARN, fmt, args); + logmsg(LOG_WARN, fmt, args); va_end(args); } @@ -64,7 +64,7 @@ void error(const char* fmt, ...) { va_list args; va_start(args, fmt); - log(LOG_ERROR, fmt, args); + logmsg(LOG_ERROR, fmt, args); va_end(args); }