mirror of https://github.com/xzeldon/htop.git
Hide degree character without wide ncurses support
This commit is contained in:
parent
f0a9dfc37e
commit
f913680020
2
CRT.c
2
CRT.c
|
@ -80,13 +80,13 @@ static const char* initDegreeSign(void) {
|
||||||
#ifdef HAVE_LIBNCURSESW
|
#ifdef HAVE_LIBNCURSESW
|
||||||
if (CRT_utf8)
|
if (CRT_utf8)
|
||||||
return "\xc2\xb0";
|
return "\xc2\xb0";
|
||||||
#endif
|
|
||||||
|
|
||||||
static char buffer[4];
|
static char buffer[4];
|
||||||
// this might fail if the current locale does not support wide characters
|
// this might fail if the current locale does not support wide characters
|
||||||
int r = snprintf(buffer, sizeof(buffer), "%lc", 176);
|
int r = snprintf(buffer, sizeof(buffer), "%lc", 176);
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
return buffer;
|
return buffer;
|
||||||
|
#endif
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue