comparison rogue3/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 3d4252fa2ed3
children 5b6855d5d089
comparison
equal deleted inserted replaced
281:4a3f4729257c 282:8b6aba552f6f
280 #else 280 #else
281 return((CE != NULL) && (*CE != 0)); 281 return((CE != NULL) && (*CE != 0));
282 #endif 282 #endif
283 } 283 }
284 284
285 void
286 md_putchar(int c)
287 {
288 putchar(c);
289 }
290
291 #ifdef _WIN32 285 #ifdef _WIN32
292 static int md_standout_mode = 0; 286 static int md_standout_mode = 0;
293 #endif 287 #endif
294 288
295 void 289 void
308 bgattr = (csbiInfo.wAttributes & 0xF0); 302 bgattr = (csbiInfo.wAttributes & 0xF0);
309 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4)); 303 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4));
310 md_standout_mode = 1; 304 md_standout_mode = 1;
311 } 305 }
312 #elif defined(SO) 306 #elif defined(SO)
313 tputs(SO,0,md_putchar); 307 tputs(SO,0,putchar);
314 fflush(stdout); 308 fflush(stdout);
315 #endif 309 #endif
316 } 310 }
317 311
318 void 312 void
331 bgattr = (csbiInfo.wAttributes & 0xF0); 325 bgattr = (csbiInfo.wAttributes & 0xF0);
332 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4)); 326 SetConsoleTextAttribute(hStdout,(fgattr << 4) | (bgattr >> 4));
333 md_standout_mode = 0; 327 md_standout_mode = 0;
334 } 328 }
335 #elif defined(SE) 329 #elif defined(SE)
336 tputs(SE,0,md_putchar); 330 tputs(SE,0,putchar);
337 fflush(stdout); 331 fflush(stdout);
338 #endif 332 #endif
339 } 333 }
340 334
341 int 335 int