From 50ea759591cb9bd71084ca393f827371cc0e031f Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 25 Dec 2007 09:33:36 +0000 Subject: -pfterm: FTCROW/FTAROW works with ft.y, not ft.ry. Never use them in refresh() internal loop. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3743 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/pfterm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c index b26e2291..5afb7a87 100644 --- a/mbbsd/pfterm.c +++ b/mbbsd/pfterm.c @@ -766,13 +766,13 @@ refresh(void) for (i = ft.rx; i < x; i++) { // if same attribute, simply accept. - if (FTAROW[i] == ft.rattr && touched) + if (FTAMAP[y][i] == ft.rattr && touched) continue; // XXX spaces may accept (BG=rBG), // but that will also change cached attribute. - if (!FTCHAR_ISBLANK(FTCROW[i])) + if (!FTCHAR_ISBLANK(FTCMAP[y][i])) break; - if (FTATTR_GETBG(FTAROW[i]) != FTATTR_GETBG(ft.rattr)) + if (FTATTR_GETBG(FTAMAP[y][i]) != FTATTR_GETBG(ft.rattr)) break; } if (i != x) @@ -789,7 +789,7 @@ refresh(void) for (i = ft.rx; i < x; i++) { fterm_rawc(FTDC[i]); - FTAROW[i] = FTOAMAP[y][i]; // spaces will change attribute... + FTAMAP[y][i] = FTOAMAP[y][i]; // spaces may change attr... ft.rx++; } @@ -2125,6 +2125,7 @@ int main(int argc, char* argv[]) getchar(); #endif +#if 0 // test resize clear(); move(1, 0); @@ -2137,8 +2138,9 @@ int main(int argc, char* argv[]) outs("2nd line\n"); refresh(); getchar(); +#endif -#if 0 +#if 1 // test optimization clear(); move(1, 0); -- cgit v1.2.3