Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _PERF_UI_SLANG_H_
0003 #define _PERF_UI_SLANG_H_ 1
0004 /*
0005  * slang versions <= 2.0.6 have a "#if HAVE_LONG_LONG" that breaks
0006  * the build if it isn't defined. Use the equivalent one that glibc
0007  * has on features.h.
0008  */
0009 #include <features.h>
0010 #ifndef HAVE_LONG_LONG
0011 #define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
0012 #endif
0013 
0014 #ifdef HAVE_SLANG_INCLUDE_SUBDIR
0015 #include <slang/slang.h>
0016 #else
0017 #include <slang.h>
0018 #endif
0019 
0020 #if SLANG_VERSION < 20104
0021 #define slsmg_printf(msg, args...) \
0022     SLsmg_printf((char *)(msg), ##args)
0023 #define slsmg_vprintf(msg, vargs) \
0024     SLsmg_vprintf((char *)(msg), vargs)
0025 #define slsmg_write_nstring(msg, len) \
0026     SLsmg_write_nstring((char *)(msg), len)
0027 #define sltt_set_color(obj, name, fg, bg) \
0028     SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
0029 #else
0030 #define slsmg_printf SLsmg_printf
0031 #define slsmg_vprintf SLsmg_vprintf
0032 #define slsmg_write_nstring SLsmg_write_nstring
0033 #define sltt_set_color SLtt_set_color
0034 #endif
0035 
0036 #define SL_KEY_UNTAB 0x1000
0037 
0038 #endif /* _PERF_UI_SLANG_H_ */