build: allow compilation to succeed on curses without italic support

The OpenBSD system that I have access to still uses ncurses-5.7,
and support for A_ITALIC appeared in version 6.0.
master
Benno Schulenberg 2020-06-22 11:15:27 +02:00
parent 9b8930cc13
commit 2430c5b230
1 changed files with 2 additions and 0 deletions

View File

@ -1058,7 +1058,9 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
}
if (strncmp(combostr, "italic", 6) == 0) {
#ifdef A_ITALIC
*attributes |= A_ITALIC;
#endif
if (combostr[6] != ',') {
jot_error(N_("An attribute requires a subsequent comma"));
return FALSE;