comparison rogue4/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 6376b514a30b
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
290:2b452dbf0138 291:5b6855d5d089
105 #if defined(__DJGPP__) || defined(_WIN32) 105 #if defined(__DJGPP__) || defined(_WIN32)
106 _fmode = _O_BINARY; 106 _fmode = _O_BINARY;
107 #endif 107 #endif
108 #if defined(__CYGWIN__) || defined(__MSYS__) 108 #if defined(__CYGWIN__) || defined(__MSYS__)
109 ESCDELAY=250; 109 ESCDELAY=250;
110 #endif
111 }
112
113 int
114 md_hasclreol(void)
115 {
116 #ifdef CE
117 return((CE != NULL) && (*CE != 0));
118 #elif defined (clr_eol)
119 return((clr_eol != NULL) && (*clr_eol != 0));
120 #elif !defined(__PDCURSES__)
121 return(clr_eol != NULL);
122 #else
123 return(TRUE);
124 #endif 110 #endif
125 } 111 }
126 112
127 static int md_standout_mode = 0; 113 static int md_standout_mode = 0;
128 114