libslang.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _PERF_UI_SLANG_H_
  3. #define _PERF_UI_SLANG_H_ 1
  4. /*
  5. * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks
  6. * the build if it isn't defined. Use the equivalent one that glibc
  7. * has on features.h.
  8. */
  9. #include <features.h>
  10. #ifndef HAVE_LONG_LONG
  11. #define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
  12. #endif
  13. #ifdef HAVE_SLANG_INCLUDE_SUBDIR
  14. #include <slang/slang.h>
  15. #else
  16. #include <slang.h>
  17. #endif
  18. #if SLANG_VERSION < 20104
  19. #define slsmg_printf(msg, args...) \
  20. SLsmg_printf((char *)(msg), ##args)
  21. #define slsmg_vprintf(msg, vargs) \
  22. SLsmg_vprintf((char *)(msg), vargs)
  23. #define slsmg_write_nstring(msg, len) \
  24. SLsmg_write_nstring((char *)(msg), len)
  25. #define sltt_set_color(obj, name, fg, bg) \
  26. SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
  27. #else
  28. #define slsmg_printf SLsmg_printf
  29. #define slsmg_vprintf SLsmg_vprintf
  30. #define slsmg_write_nstring SLsmg_write_nstring
  31. #define sltt_set_color SLtt_set_color
  32. #endif
  33. #define SL_KEY_UNTAB 0x1000
  34. #endif /* _PERF_UI_SLANG_H_ */