diff --git a/include/tradstdc.h b/include/tradstdc.h index bff09c3a7..ccbb6d839 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -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 diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index d5d21c678..f042adef8 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -24,11 +24,16 @@ extern long curs_mesg_suppress_seq; /* from cursmesg.c */ extern boolean curs_mesg_no_suppress; /* ditto */ extern int mesg_mixed; extern glyph_info mesg_gi; + #ifndef CURSES_GENL_PUTMIXED -#if !defined(PDCURSES) || defined(PDC_WIDE) +#if defined(PDC_WIDE) || defined(NCURSES_WIDECHAR) #define USE_CURSES_PUTMIXED +#else /* WIDE */ +#ifdef NH_PRAGMA_MESSAGE +#pragma message "Curses wide support not defined so NetHack curses message window functionality reduced" #endif -#endif +#endif /* WIDE */ +#endif /* CURSES_GENL_PUTMIXED */ /* stubs for curses_procs{} */ #ifdef POSITIONBAR diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index 60d37c085..14db90fbb 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -31,11 +31,14 @@ int mesg_mixed = 0; glyph_info mesg_gi; #ifndef CURSES_GENL_PUTMIXED -#if !defined(PDCURSES) || defined(PDC_WIDE) +#if defined(PDC_WIDE) || defined(NCURSES_WIDECHAR) #define USE_CURSES_PUTMIXED +#else /* WIDE */ +#ifdef NH_PRAGMA_MESSAGE +#pragma message "Curses wide support not defined so NetHack curses message window functionality reduced" #endif -#endif - +#endif /* WIDE */ +#endif /* CURSES_GENL_PUTMIXED */ /* Message window routines for curses interface */