--- rxvt-unicode/src/screen.C 2003/11/25 15:25:17 1.4 +++ rxvt-unicode/src/screen.C 2003/12/02 21:49:46 1.6 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*--------------------------------------* * File: screen.c *---------------------------------------------------------------------------* - * $Id: screen.C,v 1.4 2003/11/25 15:25:17 pcg Exp $ + * $Id: screen.C,v 1.6 2003/12/02 21:49:46 pcg Exp $ * * Copyright (c) 1997-2001 Geoff Wing * @@ -39,10 +39,6 @@ *start++ = value; } -#define RESET_CHSTAT(H) \ - if ((H)->chstat == WBYTE) \ - (H)->chstat = SBYTE, (H)->lost_multi = 1 - /* ------------------------------------------------------------------------- */ #define PROP_SIZE 16384 #define TABSIZE 8 /* default tab size */ @@ -166,7 +162,6 @@ D_SCREEN((stderr, "rxvt_scr_reset()")); R->TermWin.view_start = 0; - RESET_CHSTAT(R); R->num_scr = 0; prev_ncol = R->prev_ncol; @@ -365,7 +360,7 @@ R->prev_nrow = nrow; R->prev_ncol = ncol; - rxvt_tt_winsize(R->cmd_fd, R->TermWin.ncol, R->TermWin.nrow, R->cmd_pid); + R->tt_winch (); } /* INTPROTO */ @@ -534,7 +529,6 @@ D_SCREEN((stderr, "rxvt_scr_change_screen(%d)", scrn)); R->TermWin.view_start = 0; - RESET_CHSTAT(R); if (R->current_screen == scrn) return R->current_screen; @@ -799,14 +793,12 @@ row = (++R->screen.cur.row) + R->TermWin.saveLines; stp = R->screen.text[row]; /* _must_ refresh */ srp = R->screen.rend[row]; /* _must_ refresh */ - RESET_CHSTAT(R); continue; case '\r': if (R->screen.tlen[row] != -1) /* XXX: think about this */ MAX_IT(R->screen.tlen[row], R->screen.cur.col); R->screen.flags &= ~Screen_WrapNext; R->screen.cur.col = 0; - RESET_CHSTAT(R); continue; default: if (c == 127) @@ -909,7 +901,6 @@ void rxvt_scr_backspace(pR) { - RESET_CHSTAT(R); R->want_refresh = 1; if (R->screen.cur.col == 0) { if (R->screen.cur.row > 0) { @@ -938,7 +929,6 @@ D_SCREEN((stderr, "rxvt_scr_tab(%d)", count)); R->want_refresh = 1; - RESET_CHSTAT(R); i = x = R->screen.cur.col; if (count == 0) return; @@ -1025,7 +1015,6 @@ { R->want_refresh = 1; ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); #ifdef RXVT_GRAPHICS if (rxvt_Gr_Displayed(aR)) rxvt_Gr_scroll(aR_ 0); @@ -1079,7 +1068,6 @@ D_SCREEN((stderr, "rxvt_scr_index(%d)", dirn)); ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); #ifdef RXVT_GRAPHICS if (rxvt_Gr_Displayed(aR)) @@ -1113,7 +1101,6 @@ R->want_refresh = 1; D_SCREEN((stderr, "rxvt_scr_erase_line(%d) at screen row: %d", mode, R->screen.cur.row)); ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); #ifdef RXVT_GRAPHICS if (rxvt_Gr_Displayed(aR)) @@ -1180,7 +1167,6 @@ R->want_refresh = 1; D_SCREEN((stderr, "rxvt_scr_erase_screen(%d) at screen row: %d", mode, R->screen.cur.row)); ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); row_offset = (int32_t)R->TermWin.saveLines; switch (mode) { @@ -1254,7 +1240,6 @@ R->want_refresh = 1; R->num_scr_allow = 0; ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); rxvt_selection_check(aR_ 3); fs = SET_FONT (R->rstyle, R->TermWin.fontset->find_font ('E')); @@ -1277,7 +1262,6 @@ int end; ZERO_SCROLLBACK(R); - RESET_CHSTAT(R); #ifdef RXVT_GRAPHICS if (rxvt_Gr_Displayed(aR)) @@ -1318,9 +1302,6 @@ R->want_refresh = 1; ZERO_SCROLLBACK(R); -#if 0 - RESET_CHSTAT(R); -#endif #ifdef RXVT_GRAPHICS if (rxvt_Gr_Displayed(aR)) @@ -1550,8 +1531,7 @@ void rxvt_scr_report_position(pR) { - rxvt_tt_printf(aR_ "\033[%d;%dR", R->screen.cur.row + 1, - R->screen.cur.col + 1); + R->tt_printf("\033[%d;%dR", R->screen.cur.row + 1, R->screen.cur.col + 1); } /* ------------------------------------------------------------------------- * @@ -2419,21 +2399,23 @@ */ /* INTPROTO */ void -rxvt_PasteIt(pR_ const unsigned char *data, unsigned int nitems) +rxvt_PasteIt (pR_ const unsigned char *data, unsigned int nitems) { - unsigned int i, j, n; - unsigned char *ds = (unsigned char *)rxvt_malloc(PROP_SIZE); - -/* convert normal newline chars into common keyboard Return key sequence */ - for (i = 0; i < nitems; i += PROP_SIZE) { - n = min(nitems - i, PROP_SIZE); - MEMCPY(ds, data + i, n); - for (j = 0; j < n; j++) - if (ds[j] == '\n') - ds[j] = '\r'; - rxvt_tt_write(aR_ ds, (int)n); + unsigned int i, j, n; + unsigned char *ds = (unsigned char *)rxvt_malloc (PROP_SIZE); + + /* convert normal newline chars into common keyboard Return key sequence */ + for (i = 0; i < nitems; i += PROP_SIZE) + { + n = min (nitems - i, PROP_SIZE); + MEMCPY (ds, data + i, n); + for (j = 0; j < n; j++) + if (ds[j] == '\n') + ds[j] = '\r'; + R->tt_write (ds, (int)n); } - free(ds); + + free(ds); } /* ------------------------------------------------------------------------- */