mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
remove UTF-8 code when compiling with --disable-unicode
This commit is contained in:
14
CRT.c
14
CRT.c
@ -133,6 +133,8 @@ const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
|
||||
"-", // TREE_STR_SHUT
|
||||
};
|
||||
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
const char *CRT_treeStrUtf8[TREE_STR_COUNT] = {
|
||||
"\xe2\x94\x80", // TREE_STR_HORZ ─
|
||||
"\xe2\x94\x82", // TREE_STR_VERT │
|
||||
@ -143,14 +145,16 @@ const char *CRT_treeStrUtf8[TREE_STR_COUNT] = {
|
||||
"\xe2\x94\x80", // TREE_STR_SHUT ─
|
||||
};
|
||||
|
||||
bool CRT_utf8 = false;
|
||||
|
||||
#endif
|
||||
|
||||
const char **CRT_treeStr = CRT_treeStrAscii;
|
||||
|
||||
static bool CRT_hasColors;
|
||||
|
||||
int CRT_delay = 0;
|
||||
|
||||
bool CRT_utf8 = false;
|
||||
|
||||
int* CRT_colors;
|
||||
|
||||
int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
@ -596,7 +600,11 @@ void CRT_init(int delay, int colorScheme) {
|
||||
CRT_utf8 = false;
|
||||
#endif
|
||||
|
||||
CRT_treeStr = CRT_utf8 ? CRT_treeStrUtf8 : CRT_treeStrAscii;
|
||||
CRT_treeStr =
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
CRT_utf8 ? CRT_treeStrUtf8 :
|
||||
#endif
|
||||
CRT_treeStrAscii;
|
||||
|
||||
mousemask(BUTTON1_CLICKED, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user