blob: e0b59e5e3ba9056ecc97477a4b15dbb795a6f4b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#pragma once
// KPL specific macros
#include "color.h"
#include "type.h"
#define _KPL_PRINT_(MESSAGE_COLOR, MESSAGE) printf(KPL_COLOR2(BOLD, MESSAGE_COLOR) "TODO " KPL_COLOR(RESET) KPL_COLOR(BOLD) "%s" KPL_COLOR(RESET) ":" KPL_COLOR(LIGHT_BLUE) "%s" KPL_COLOR(RESET) ":" KPL_COLOR(LIGHT_MAGENTA) "%d" KPL_COLOR(RESET) "::" KPL_COLOR(MESSAGE_COLOR) "%s\n" KPL_COLOR(RESET), __FILE__, __FUNCTION__, __LINE__, MESSAGE)
#define KPL_PRINT_TODO(MESSAGE) _KPL_PRINT_(LIGHT_YELLOW, MESSAGE)
#define KPL_PRINT_ERROR(MESSAGE) _KPL_PRINT_(LIGHT_RED, MESSAGE)
#define KPL_PAGE_SIZE_ROUND(SIZE) ((SIZE + (getpagesize() - 1)) & ~(getpagesize() - 1))
|