comparison rogue4/mdport.c @ 282:8b6aba552f6f

Excise md_putchar(). The function wrapped the standard putchar(), doing nothing beside discarding the return value. That could cause problems with tputs(), which expects an int to be returned.
author John "Elwin" Edwards
date Mon, 18 Sep 2017 19:11:57 -0400
parents d3968e9cb98d
children 6376b514a30b
comparison
equal deleted inserted replaced
281:4a3f4729257c 282:8b6aba552f6f
117 #else 117 #else
118 return(TRUE); 118 return(TRUE);
119 #endif 119 #endif
120 } 120 }
121 121
122 void
123 md_putchar(int c)
124 {
125 putchar(c);
126 }
127
128 static int md_standout_mode = 0; 122 static int md_standout_mode = 0;
129 123
130 void 124 void
131 md_raw_standout(void) 125 md_raw_standout(void)
132 { 126 {
143 bgattr = (csbiInfo.wAttributes & 0xF0); 137 bgattr = (csbiInfo.wAttributes & 0xF0);
144 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4)); 138 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4));
145 md_standout_mode = 1; 139 md_standout_mode = 1;
146 } 140 }
147 #elif defined(SO) 141 #elif defined(SO)
148 tputs(SO,0,md_putchar); 142 tputs(SO,0,putchar);
149 fflush(stdout); 143 fflush(stdout);
150 #endif 144 #endif
151 } 145 }
152 146
153 void 147 void
166 bgattr = (csbiInfo.wAttributes & 0xF0); 160 bgattr = (csbiInfo.wAttributes & 0xF0);
167 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4)); 161 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4));
168 md_standout_mode = 0; 162 md_standout_mode = 0;
169 } 163 }
170 #elif defined(SE) 164 #elif defined(SE)
171 tputs(SE,0,md_putchar); 165 tputs(SE,0,putchar);
172 fflush(stdout); 166 fflush(stdout);
173 #endif 167 #endif
174 } 168 }
175 169
176 int 170 int