blob: d54446f23e1d71a9ab6355442140d047d00fa592 [file] [log] [blame]
Dees_Troy2673cec2013-04-02 20:22:16 +00001#ifndef TWCOMMON_HPP
2#define TWCOMMON_HPP
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
Ethan Yonker50381972014-02-11 11:44:06 -06008#ifndef BUILD_TWRPTAR_MAIN
Dees_Troy2673cec2013-04-02 20:22:16 +00009#include "gui/gui.h"
Ethan Yonkerbf2cb1c2014-07-02 10:15:54 -050010#define LOGERR(...) gui_print_color("error", "E:" __VA_ARGS__)
Dees_Troy2673cec2013-04-02 20:22:16 +000011#define LOGINFO(...) fprintf(stdout, "I:" __VA_ARGS__)
Ethan Yonker50381972014-02-11 11:44:06 -060012#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_Troy2673cec2013-04-02 20:22:16 +000017
18#define STRINGIFY(x) #x
19#define EXPAND(x) STRINGIFY(x)
20
21#ifdef __cplusplus
22}
23#endif
24
25#endif // TWCOMMON_HPP