Cleanup drivers/char/console.c
The following patch cleans up the FLUSH macro used in drivers/char/console.c. I haven't made any deep dark changes... just added a ";" at the end of the lines where FLUSH is called, cause it looked pretty wierd w/o it.
--timball
--snip--snip--snip--
console.c renamed from console.c.orig +11 -9
@@ -1830,12 +1830,14 @@ const unsigned char *buf, int count) {#ifdef VT_BUF_VRAM_ONLY -#define FLUSH do { } while(0); +#define FLUSH () do { } while(0)#else -#define FLUSH if (draw_x >= 0) { \ - sw->con_putcs(vc_cons[currcons].d, (u16 *)draw_from, (u16 *)draw_to-(u16 *)draw_from, y, draw_x); \ - draw_x = -1; \ - } +#define FLUSH () do { \ + if (draw_x >= 0) { \ + sw->con_putcs(vc_cons[currcons].d, (u16 *)draw_from, (u16 *)draw_to-(u16 *)draw_from, y, draw_x); \ + draw_x = -1; \ + } \ + } while(0)#endif int c, tc, ok, n =0 , draw_x =-1 ;
@@ -1975,7 +1977,7 @@continue ;/* Conversion failed */ if (need_wrap || decim) - FLUSH +FLUSH ();if (need_wrap) {cr (currcons);lf (currcons);
@@ -1999,10 +2001,10 @@ }continue ; } -FLUSH +FLUSH ();do_con_trol (tty, currcons, c); } -FLUSH +FLUSH ();console_conditional_schedule ();release_console_sem ();
@@ -2024,7 +2026,7 @@ }return n; -#undef FLUSH +#undef FLUSH() }/*
Signature · 3 lines
GPG key available on pgpkeys.mit.edu pub 1024D/511FBD54 2001-07-23 Timothy Lu Hu Ball <[email protected]> Key fingerprint = B579 29B0 F6C8 C7AA 3840 E053 FE02 BB97 511F BD54
Quoted 5 lines
The following patch cleans up the FLUSH macro used in
drivers/char/console.c. I haven't made any deep dark changes... just added a ";" at the end of the lines where FLUSH is called, cause it looked pretty wierd w/o it.
I'm reworking the VT system right now. That macro is going to go away.