#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
Go to the source code of this file.
|
#define | DEBUG_LINE() do{printf("%s:%4d %s().\n", __FILE__, __LINE__, __FUNCTION__);fflush(stdout);}while(0) |
|
#define | DEBUG_STR(X) do{printf( "%s: %s\n", #X, (char*)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_VAR(X) do{printf( "%-20s: 0x%08" PRIX32 "\n", #X, (uint32_t)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_VAR2(X) do{printf( "%-20s: 0x%08" PRIX32 " (%i)\n", #X, (uint32_t)(X), (int)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_INT(X) do{printf( "%-20s: %10" PRIi32 "\n", #X, (int32_t)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_FLOAT(X) do{printf( "%-20s: %10.3f\n", #X, (float)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_VAR64(X) do{printf( "%-20s: 0x%016" PRIX64 "\n", #X, (uint64_t)(X));fflush(stdout);}while(0) |
|
#define | DEBUG_MAGIC(X) do{printf( "%-20s: '%c''%c''%c''%c' (0x%08X)\n", #X, (u32)(X)>>24, (u32)(X)>>16, (u32)(X)>>8, (u32)(X),(u32)(X));fflush(stdout);}while(0) |
|
#define | PRINTFPOS(X, Y) "\x1b["#X";"#Y"H" |
|
#define | PRINTFPOS_STR(X, Y) "\x1b[" X ";" Y "H" |
|
#define | PRINTF_LINE(X) "\x1b[" X ";0H" |
|
◆ DEBUG_FLOAT
#define DEBUG_FLOAT |
( |
|
X | ) |
do{printf( "%-20s: %10.3f\n", #X, (float)(X));fflush(stdout);}while(0) |
◆ DEBUG_INT
#define DEBUG_INT |
( |
|
X | ) |
do{printf( "%-20s: %10" PRIi32 "\n", #X, (int32_t)(X));fflush(stdout);}while(0) |
◆ DEBUG_LINE
#define DEBUG_LINE |
( |
| ) |
do{printf("%s:%4d %s().\n", __FILE__, __LINE__, __FUNCTION__);fflush(stdout);}while(0) |
◆ DEBUG_MAGIC
#define DEBUG_MAGIC |
( |
|
X | ) |
do{printf( "%-20s: '%c''%c''%c''%c' (0x%08X)\n", #X, (u32)(X)>>24, (u32)(X)>>16, (u32)(X)>>8, (u32)(X),(u32)(X));fflush(stdout);}while(0) |
◆ DEBUG_STR
#define DEBUG_STR |
( |
|
X | ) |
do{printf( "%s: %s\n", #X, (char*)(X));fflush(stdout);}while(0) |
◆ DEBUG_VAR
#define DEBUG_VAR |
( |
|
X | ) |
do{printf( "%-20s: 0x%08" PRIX32 "\n", #X, (uint32_t)(X));fflush(stdout);}while(0) |
◆ DEBUG_VAR2
#define DEBUG_VAR2 |
( |
|
X | ) |
do{printf( "%-20s: 0x%08" PRIX32 " (%i)\n", #X, (uint32_t)(X), (int)(X));fflush(stdout);}while(0) |
◆ DEBUG_VAR64
#define DEBUG_VAR64 |
( |
|
X | ) |
do{printf( "%-20s: 0x%016" PRIX64 "\n", #X, (uint64_t)(X));fflush(stdout);}while(0) |
◆ PRINTF_LINE
#define PRINTF_LINE |
( |
|
X | ) |
"\x1b[" X ";0H" |
◆ PRINTFPOS
#define PRINTFPOS |
( |
|
X, |
|
|
|
Y |
|
) |
| "\x1b["#X";"#Y"H" |
◆ PRINTFPOS_STR
#define PRINTFPOS_STR |
( |
|
X, |
|
|
|
Y |
|
) |
| "\x1b[" X ";" Y "H" |