18 lines
385 B
C
18 lines
385 B
C
#pragma once
|
|
#include <stdio.h>
|
|
|
|
#define W(fmt, ...) do { \
|
|
fprintf(stderr, "[WARN] %s: " fmt, __func__, ##__VA_ARGS__); \
|
|
} while(0)
|
|
|
|
#define E(fmt, ...) do { \
|
|
fprintf(stderr, "[ERROR] %s: " fmt, __func__, ##__VA_ARGS__); \
|
|
exit(1); \
|
|
} while(0)
|
|
|
|
#define V(fmt, ...) do { \
|
|
if (options.verbose) { \
|
|
fprintf(stdout, "[INFO] %s: " fmt, __func__, ##__VA_ARGS__); \
|
|
} \
|
|
} while(0)
|