commit 1c33e9c30ac51469441b9810ef8a522948f2584e
parent 2c120da6a49bb47999d4b37a327fcb234a70f9a2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Aug 2020 14:55:09 +0200
fix annoying type issue on different (n)curses versions causing a warning
On some systems it is tparm(const char *, ...) on others its tparm(char *, ...)
Diffstat:
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -446,15 +446,21 @@ cursorrestore(void)
void
attrmode(int mode)
{
- char *p;
-
- /*ttywritef("\x1b[%dm", mode);*/
switch (mode) {
- case ATTR_RESET: p = exit_attribute_mode; break;
- case ATTR_BOLD_ON: p = enter_bold_mode; break;
- case ATTR_FAINT_ON: p = enter_dim_mode; break;
- case ATTR_REVERSE_ON: p = enter_reverse_mode; break;
- default: return;
+ case ATTR_RESET:
+ ttywrite(tparm(exit_attribute_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ break;
+ case ATTR_BOLD_ON:
+ ttywrite(tparm(enter_bold_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ break;
+ case ATTR_FAINT_ON:
+ ttywrite(tparm(enter_dim_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ break;
+ case ATTR_REVERSE_ON:
+ ttywrite(tparm(enter_reverse_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ break;
+ default:
+ return;
}
ttywrite(tparm(p, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}