Debug refactor
This commit is contained in:
@@ -35,13 +35,20 @@
|
||||
#ifndef __DEBUG_H
|
||||
#define __DEBUG_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ncurses.h>
|
||||
|
||||
#if DEBUG
|
||||
#define Debug(__info,...) mvprintw(0, 0, "Debug: " __info,##__VA_ARGS__); refresh()
|
||||
#define Debug(__info, ...) do { \
|
||||
mvprintw(30, 0, "Debug:" __info, ##__VA_ARGS__); \
|
||||
refresh(); \
|
||||
} while (0)
|
||||
#define DebugLine(y, x, __info, ...) do { \
|
||||
mvprintw((y), (x), "Debug: " __info, ##__VA_ARGS__); \
|
||||
refresh(); \
|
||||
} while (0)
|
||||
#else
|
||||
#define Debug(__info,...)
|
||||
#define Debug(__info, ...)
|
||||
#define DebugLine(y, x, __info, ...)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user