another follow-up for curses_putmixed

We received a report from someone whose build was failing because
of the use of cchar_t and setcchar(). They were getting errors
even though they were using an up-to-date curses library.

Apparently, ncurses requires that _XOPEN_SOURCE_EXTENDED must be
defined before the curses header files in order for those features
to be available.

We had already updated our .370 series of hints and hints/include
files with
    -D_XOPEN_SOURCE_EXTENDED=1
but this person must have been building in some other way.

Instead of failing to build in that situation, allow the
fallback to the older, less-functional genl_putmixed() function,
but also try not to do so silently and display a message that
functionality is reduced.

The difference between the use of genl_putmixed() and
curses_putmixed() or tty_putmixed(), is that when doing
'/' farlook operations, curses_putmixed() and tty_putmixed() try to
display a character in the message window that looks exactly the same
as the one on the map, even if a symbol from a symset is being used
on the map, or when using ENHANCED_SYMBOLS.

Related note: curses_putmixed() matches the symbol and the color,
whereas tty_putmixed() (at present) does not attempt to match the
color.
This commit is contained in:
nhmall
2023-06-12 14:03:39 -04:00
parent 36ba2b9a0e
commit 299d49aebf
3 changed files with 17 additions and 5 deletions

View File

@@ -362,6 +362,8 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
#endif
#if __GNUC__ >= 5
#define NONNULL __attribute__((returns_nonnull))
/* #pragma message is available */
#define NH_PRAGMA_MESSAGE 1
#endif
#endif
@@ -369,6 +371,8 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
#ifndef ATTRNORETURN
#define ATTRNORETURN __declspec(noreturn)
#endif
/* #pragma message is available */
#define NH_PRAGMA_MESSAGE 1
#endif
#ifndef PRINTF_F