/*!@file \brief Macros for printing unicode to streams \details Standardized method of handling unicodes in warnings, and errors \author Jordan Lavatai \date Aug 2016 ----------------------------------------------------------------------------*/ /* u8 print macros */ #ifndef _PRINT_H_ #define _PRINT_H_ #include #ifndef DEBUG #define DEBUG 0 #endif #define uprintf(...) do { \ ulc_fprintf(stdout, __VA_ARGS__); \ } while (0) #define ufprintf(_STREAM,...) do { \ ulc_fprintf(_STREAM, __VA_ARGS__); \ } while (0) #define do_warn(...) do { \ } while (0) #define wprintf(...) do { \ ufprintf(stderr, __VA_ARGS__); \ do_warn(__VA_ARGS__); \ } while (0) #define do_error(...) do { \ } while (0) #define eprintf(...) do { \ ufprintf(stderr, __VA_ARGS__); \ do_error(__VA_ARGS_); \ } while (0) #define bprintf(_BOOL,...) do { \ if (_BOOL) \ ufprintf(stdout, __VA_ARGS__); \ } while (0) #define dprintf(...) do { \ bprintf(DEBUG, __VA_ARGS__); \ } while (0) #endif