Mercurial > hg > early-roguelike
diff arogue5/mdport.c @ 291:5b6855d5d089
Fix a portability issue with md_hasclreol().
Some games' implementation of md_hasclreol() poked around in ncurses
internals, which does not work for some ncurses build configuration.
Most games did not actually call md_hasclreol(), so it was removed.
There is a standard terminfo function which can retrieve the value of
the clr_eol capability, so this was used for rogue5.
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 Dec 2017 10:26:06 -0500 |
parents | 17005af49963 |
children | e52a8a7ad4c5 |
line wrap: on
line diff
--- a/arogue5/mdport.c Sun Nov 26 11:34:45 2017 -0500 +++ b/arogue5/mdport.c Wed Dec 27 10:26:06 2017 -0500 @@ -106,24 +106,6 @@ #endif } -int -md_hasclreol(void) -{ -#if defined(clr_eol) -#ifdef NCURSES_VERSION - if (cur_term == NULL) - return(0); - if (cur_term->type.Strings == NULL) - return(0); -#endif - return((clr_eol != NULL) && (*clr_eol != 0)); -#elif defined(__PDCURSES__) - return(TRUE); -#else - return((CE != NULL) && (*CE != 0)); -#endif -} - #ifdef attron # define _puts(s) tputs(s, 0, putchar); # define SO enter_standout_mode