Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 1 | #ifndef _PERF_UI_SLANG_H_ |
| 2 | #define _PERF_UI_SLANG_H_ 1 |
| 3 | /* |
| 4 | * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks |
| 5 | * the build if it isn't defined. Use the equivalent one that glibc |
| 6 | * has on features.h. |
| 7 | */ |
| 8 | #include <features.h> |
| 9 | #ifndef HAVE_LONG_LONG |
| 10 | #define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG |
| 11 | #endif |
| 12 | #include <slang.h> |
| 13 | |
| 14 | #if SLANG_VERSION < 20104 |
| 15 | #define slsmg_printf(msg, args...) \ |
Yinghai Lu | cdb0861 | 2011-02-01 10:51:23 -0800 | [diff] [blame] | 16 | SLsmg_printf((char *)(msg), ##args) |
Arnaldo Carvalho de Melo | 517dfdb | 2015-08-11 12:50:55 -0300 | [diff] [blame] | 17 | #define slsmg_vprintf(msg, vargs) \ |
| 18 | SLsmg_vprintf((char *)(msg), vargs) |
Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 19 | #define slsmg_write_nstring(msg, len) \ |
Yinghai Lu | cdb0861 | 2011-02-01 10:51:23 -0800 | [diff] [blame] | 20 | SLsmg_write_nstring((char *)(msg), len) |
Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 21 | #define sltt_set_color(obj, name, fg, bg) \ |
Yinghai Lu | cdb0861 | 2011-02-01 10:51:23 -0800 | [diff] [blame] | 22 | SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg)) |
Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 23 | #else |
| 24 | #define slsmg_printf SLsmg_printf |
Arnaldo Carvalho de Melo | 517dfdb | 2015-08-11 12:50:55 -0300 | [diff] [blame] | 25 | #define slsmg_vprintf SLsmg_vprintf |
Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 26 | #define slsmg_write_nstring SLsmg_write_nstring |
| 27 | #define sltt_set_color SLtt_set_color |
| 28 | #endif |
| 29 | |
Arnaldo Carvalho de Melo | cf95800 | 2011-10-20 16:59:15 -0200 | [diff] [blame] | 30 | #define SL_KEY_UNTAB 0x1000 |
| 31 | |
Arnaldo Carvalho de Melo | 211ef12 | 2010-08-10 14:54:09 -0300 | [diff] [blame] | 32 | #endif /* _PERF_UI_SLANG_H_ */ |