[host] added option parsing to application

This commit is contained in:
Geoffrey McRae
2017-11-16 20:53:22 +11:00
parent 71c6e5d317
commit 6eb40a1897
15 changed files with 462 additions and 94 deletions

View File

@@ -18,11 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdio.h>
#ifdef DEBUG
#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, type " %20s:%-5u | %-24s | " fmt "\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0)
#else
#define DEBUG_PRINT(type, fmt, ...) do {} while(0)
#endif
#define DEBUG_PRINT(type, fmt, ...) do {fprintf(stderr, type " %20s:%-5u | %-24s | " fmt "\n", __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__);} while (0)
#define DEBUG_INFO(fmt, ...) DEBUG_PRINT("[I]", fmt, ##__VA_ARGS__)
#define DEBUG_WARN(fmt, ...) DEBUG_PRINT("[W]", fmt, ##__VA_ARGS__)