diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..58c2af6 --- /dev/null +++ b/common.h @@ -0,0 +1,22 @@ +/* + * Copyright 2019 ~ 2021 YuutaW Minecraft, All Rights Reserved. + * Proprietary and confidential. + * Unauthorized copying of any parts of this file, via any medium is strictly prohibited. + * Written by Yuuta Liang <yuuta@yuuta.moe>, April 2021. + */ + +#ifndef _COMMON_H +#define _COMMON_H + +#include <libintl.h> +#define _(X) gettext(X) + +#ifdef DISABLE_DEBUG +#define DEBUG(fmt) +#define DEBUGF(fmt, ...) +#else +#define DEBUG(fmt, ...) do { fprintf(stdout, fmt); } while (0) +#define DEBUGF(fmt, ...) do { fprintf(stdout, fmt, __VA_ARGS__); } while (0) +#endif + +#endif // _COMMON_H |