mirror of
https://github.com/CrazyRedMachine/popnhax.git
synced 2024-12-18 07:55:52 +01:00
19 lines
317 B
C
19 lines
317 B
C
#ifndef __LOG_H__
|
|
#define __LOG_H__
|
|
|
|
#include <cstdio>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
extern FILE *g_log_fp;
|
|
|
|
#define LOG(...) do { \
|
|
if (g_log_fp != NULL) { \
|
|
fprintf(g_log_fp, __VA_ARGS__); \
|
|
fflush(g_log_fp);\
|
|
}\
|
|
fprintf(stderr, __VA_ARGS__); \
|
|
} while (0)
|
|
|
|
#endif |