-/* $OpenBSD: pcvt_out.c,v 1.20 2000/04/02 00:03:11 aaron Exp $ */
+/* $OpenBSD: pcvt_out.c,v 1.21 2000/04/09 20:21:30 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
/* char range 0x20...0xff processing depends on current state */
- if (svsp->lastchar && svsp->m_awm && svsp->lastrow == svsp->row)
- {
- svsp->cur_offset++;
- svsp->col = 0;
- svsp->lastchar = 0;
- if (check_scrollback(svsp)) {
- bcopy(svsp->Crtat + svsp->cur_offset -
- svsp->maxcol, svsp->Scrollback +
- (svsp->scr_offset * svsp->maxcol),
- svsp->maxcol * CHR);
- }
- check_scroll(svsp);
- }
switch(svsp->state) {
case STATE_INIT:
+ if (svsp->lastchar && svsp->m_awm &&
+ (svsp->lastrow == svsp->row))
+ {
+ svsp->cur_offset++;
+ svsp->col = 0;
+ svsp->lastchar = 0;
+ if (check_scrollback(svsp)) {
+ bcopy(svsp->Crtat + svsp->cur_offset -
+ svsp->maxcol, svsp->Scrollback +
+ (svsp->scr_offset * svsp->maxcol),
+ svsp->maxcol * CHR);
+ }
+ check_scroll(svsp);
+ }
+
if(svsp->irm)
bcopy((svsp->Crtat + svsp->cur_offset),
(svsp->Crtat + svsp->cur_offset) + 1,