comparison urogue/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 3b61f1dfcc91
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
290:2b452dbf0138 291:5b6855d5d089
98 #if defined(__DJGPP__) || defined(_WIN32) 98 #if defined(__DJGPP__) || defined(_WIN32)
99 _fmode = _O_BINARY; 99 _fmode = _O_BINARY;
100 #endif 100 #endif
101 #if defined(__CYGWIN__) || defined(__MSYS__) 101 #if defined(__CYGWIN__) || defined(__MSYS__)
102 ESCDELAY=250; 102 ESCDELAY=250;
103 #endif
104 }
105
106 int
107 md_hasclreol()
108 {
109 #ifndef attron
110 return(!CE);
111 #elif !defined(__PDCURSES__)
112 return(clr_eol != NULL);
113 #else
114 return(TRUE);
115 #endif 103 #endif
116 } 104 }
117 105
118 #ifdef attron 106 #ifdef attron
119 # define _puts(s) tputs(s, 0, putchar); 107 # define _puts(s) tputs(s, 0, putchar);