1 
2 /*-------------------------------------------------------------------
3  *
4  * Name:        textcolor.h
5  *
6  * Purpose:     Set color of text.
7  *
8  *--------------------------------------------------------------------*/
9 
10 
11 #ifndef TEXTCOLOR_H
12 #define TEXTCOLOR_H 1
13 
14 enum dw_color_e { 	DW_COLOR_INFO,		/* black */
15 			DW_COLOR_ERROR,		/* red */
16 			DW_COLOR_REC,		/* green */
17 			DW_COLOR_DECODED,	/* blue */
18 			DW_COLOR_XMIT,		/* magenta */
19 			DW_COLOR_DEBUG		/* dark_green */
20 		};
21 
22 typedef enum dw_color_e dw_color_t;
23 
24 
25 void text_color_init (int enable_color);
26 void text_color_set (dw_color_t c);
27 void text_color_term (void);
28 
29 
30 /* Degree symbol. */
31 
32 #if __WIN32__
33 
34 //#define CH_DEGREE "\xc2\xb0"	/* UTF-8. */
35 
36 #define CH_DEGREE " "
37 
38 
39 #else
40 
41 /* Maybe we could change this based on LANG environment variable. */
42 
43 //#define CH_DEGREE "\xc2\xb0"	/* UTF-8. */
44 
45 #define CH_DEGREE " "
46 
47 #endif
48 
49 
50 
51 int dw_printf (const char *fmt, ...)
52 #if __WIN32__
53 				__attribute__((format(ms_printf,1,2)));		/* Win C lib. */
54 #else
55 				__attribute__((format(printf,1,2)));		/* gnu C lib. */
56 #endif
57 
58 #endif
59