Readd unconst cast to tparm calls

Removed in 0dfa7421f3, breaks build with NetBSD curses.
This commit is contained in:
Fabian Homborg 2020-01-05 18:51:33 +01:00
parent f1ce967dfa
commit 484e590b7b

View File

@ -1153,7 +1153,7 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
if (screen_width > non_space_width) {
bool justgrey = true;
if (cur_term && enter_dim_mode) {
std::string dim = tparm(enter_dim_mode);
std::string dim = tparm((char *)enter_dim_mode);
if (!dim.empty()) {
// Use dim if they have it, so the color will be based on their actual normal
// color and the background of the termianl.
@ -1164,14 +1164,14 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
if (cur_term && justgrey && set_a_foreground) {
if (max_colors >= 238) {
// draw the string in a particular grey
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 237)));
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 237)));
} else if (max_colors >= 9) {
// bright black (the ninth color, looks grey)
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 8)));
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 8)));
} else if (max_colors >= 2 && enter_bold_mode) {
// we might still get that color by setting black and going bold for bright
abandon_line_string.append(str2wcstring(tparm(enter_bold_mode)));
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 0)));
abandon_line_string.append(str2wcstring(tparm((char *)enter_bold_mode)));
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 0)));
}
}
@ -1179,7 +1179,7 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
if (cur_term && exit_attribute_mode) {
abandon_line_string.append(
str2wcstring(tparm(exit_attribute_mode))); // normal text ANSI escape sequence
str2wcstring(tparm((char *)exit_attribute_mode))); // normal text ANSI escape sequence
}
int newline_glitch_width = term_has_xn ? 0 : 1;