libslang.h 928 B

1234567891011121314151617181920212223242526272829303132
  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_vprintf(msg, vargs) \
  17. SLsmg_vprintf((char *)(msg), vargs)
  18. #define slsmg_write_nstring(msg, len) \
  19. SLsmg_write_nstring((char *)(msg), len)
  20. #define sltt_set_color(obj, name, fg, bg) \
  21. SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
  22. #else
  23. #define slsmg_printf SLsmg_printf
  24. #define slsmg_vprintf SLsmg_vprintf
  25. #define slsmg_write_nstring SLsmg_write_nstring
  26. #define sltt_set_color SLtt_set_color
  27. #endif
  28. #define SL_KEY_UNTAB 0x1000
  29. #endif /* _PERF_UI_SLANG_H_ */