static void flushln(void) { register int lastmode; register int i; int hadmodes = 0; lastmode = NORMAL; for (i=0; i<maxcol; i++) { obaccs(i); if (obuf[i].c_mode != lastmode) { hadmodes++; setmod(obuf[i].c_mode); lastmode = obuf[i].c_mode; } if (obuf[i].c_char == '\0') { if (upln) { put(cursor_right); } else outc(' '); } else outc(obuf[i].c_char); while (i < maxcol-1 && obuf[i+1].c_mode & FILLER) i++; } if (lastmode != NORMAL) { setmod(0); } if (must_overstrike && hadmodes) overstrike(); putchar('\n'); if (iflag && hadmodes) iattr(); fflush(stdout); if (upln) upln--; initbuf(); }
static void flushln(void) { int lastmode; int i; int hadmodes = 0; lastmode = NORMAL; for (i=0; i<maxcol; i++) { if (obuf[i].c_mode != lastmode) { hadmodes++; setnewmode(obuf[i].c_mode); lastmode = obuf[i].c_mode; } if (obuf[i].c_char == '\0') { if (upln) PRINT(CURS_RIGHT); else outc(' ', 1); } else outc(obuf[i].c_char, obuf[i].c_width); if (obuf[i].c_width > 1) i += obuf[i].c_width - 1; } if (lastmode != NORMAL) { setnewmode(0); } if (must_overstrike && hadmodes) overstrike(); putwchar('\n'); if (iflag && hadmodes) iattr(); (void)fflush(stdout); if (upln) upln--; initbuf(); }