Debug.h
用于打印 Debug 信息的小工具:
#pragma once#include <stdio.h>#define DEBUG 1#define pn puts("")
#define where printf("%s(%d)-<%s>.\n\n", __FILE__, __LINE__, __FUNCTION__)#if (DEBUG == 1)
#define print_error(fmt, ...) \{ \printf(fmt "some error message.\n", __VA_ARGS__); \where; \}
#else
#define print_error(fmt, ...) \{ \printf(">"); \fflush(stdout); \}
#endif