Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 1 | #ifndef TWCOMMON_HPP |
| 2 | #define TWCOMMON_HPP |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 8 | #ifndef BUILD_TWRPTAR_MAIN |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 9 | #include "gui/gui.h" |
| 10 | #define LOGERR(...) gui_print("E:" __VA_ARGS__) |
| 11 | #define LOGINFO(...) fprintf(stdout, "I:" __VA_ARGS__) |
Ethan Yonker | 5038197 | 2014-02-11 11:44:06 -0600 | [diff] [blame] | 12 | #else |
| 13 | #define LOGERR(...) printf("E:" __VA_ARGS__) |
| 14 | #define LOGINFO(...) printf("I:" __VA_ARGS__) |
| 15 | #define gui_print(...) printf( __VA_ARGS__ ) |
| 16 | #endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 17 | |
| 18 | #define STRINGIFY(x) #x |
| 19 | #define EXPAND(x) STRINGIFY(x) |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | } |
| 23 | #endif |
| 24 | |
| 25 | #endif // TWCOMMON_HPP |