libslang.h 790 B

12345678910111213141516171819202122232425262728
  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. #if SLANG_VERSION < 20104
  14. #define slsmg_printf(msg, args...) \
  15. SLsmg_printf((char *)(msg), ##args)
  16. #define slsmg_write_nstring(msg, len) \
  17. SLsmg_write_nstring((char *)(msg), len)
  18. #define sltt_set_color(obj, name, fg, bg) \
  19. SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
  20. #else
  21. #define slsmg_printf SLsmg_printf
  22. #define slsmg_write_nstring SLsmg_write_nstring
  23. #define sltt_set_color SLtt_set_color
  24. #endif
  25. #endif /* _PERF_UI_SLANG_H_ */