summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/pcvt/pcvt_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/isa/pcvt/pcvt_out.c')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_out.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_out.c b/sys/arch/i386/isa/pcvt/pcvt_out.c
index 5d54bc5cd1d..e491dffe2ca 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_out.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_out.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_out.c,v 1.23 2000/06/11 18:57:35 aaron Exp $ */
+/* $OpenBSD: pcvt_out.c,v 1.24 2000/06/30 15:27:25 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -216,12 +216,10 @@ sput (u_char *s, U_char kernel, int len, int page)
}
if(svsp->lnm) {
svsp->cur_offset -= svsp->col;
- svsp->cur_offset += svsp->maxcol;
svsp->col = 0;
}
- else {
- svsp->cur_offset += svsp->maxcol;
- }
+ svsp->row = svsp->cur_offset / svsp->maxcol;
+ svsp->cur_offset += svsp->maxcol;
check_scroll(svsp);
break;
@@ -358,6 +356,7 @@ sput (u_char *s, U_char kernel, int len, int page)
if (svsp->lastchar && svsp->m_awm &&
(svsp->lastrow == svsp->row))
{
+ svsp->row = svsp->cur_offset / svsp->maxcol;
svsp->cur_offset++;
svsp->col = 0;
svsp->lastchar = 0;
@@ -1300,17 +1299,11 @@ vt_coldmalloc(void)
static void
check_scroll(struct video_state *svsp)
{
- int region_size;
-
- region_size = (svsp->scrr_end + 1) * svsp->maxcol;
-
if(!svsp->abs_write)
{
/* we write within scroll region */
- if((svsp->cur_offset == region_size) ||
- (svsp->cur_offset > region_size && (svsp->scrr_end ==
- svsp->screen_rows - 1)))
+ if(svsp->row + 1 == svsp->scrr_len)
{
/* the following piece of code has to be protected */
/* from trying to switch to another virtual screen */