From 169f7f2a06aad4c32393914444209324aee9d3ef Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 12 May 1996 21:42:44 +0000 Subject: [PATCH] Fixed the vt220 printing bug. Fixed the 'loss of console output while X is switched in' bug. --- sys/arch/arm32/dev/console/vt220.c | 12 +++++++----- sys/arch/arm32/vidc/console/vt220.c | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/arch/arm32/dev/console/vt220.c b/sys/arch/arm32/dev/console/vt220.c index afe410b3c34f..156f2bfce0d2 100644 --- a/sys/arch/arm32/dev/console/vt220.c +++ b/sys/arch/arm32/dev/console/vt220.c @@ -1,4 +1,4 @@ -/* $NetBSD: vt220.c,v 1.5 1996/05/06 00:47:20 mark Exp $ */ +/* $NetBSD: vt220.c,v 1.6 1996/05/12 21:42:44 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -1173,7 +1173,7 @@ do_render_noscroll(c, vc) { if (((vc->flags)&(LOSSY))==0) { - if ( vc->charmap[vc->xcur+vc->ycur*vc->xchars] != (c | cdata->attribs) ) + if ( vc->charmap[vc->xcur+vc->ycur*vc->xchars] != c | cdata->attribs) { if ( vc==vconsole_current ) vc->RENDER ( vc, c ); @@ -1286,7 +1286,7 @@ do_render(c, vc) { if ( cdata->irm == 0 ) { - if(vc->charmap[vc->xcur+vc->ycur*vc->xchars]!= (c | cdata->attribs) ) + if(vc->charmap[vc->xcur+vc->ycur*vc->xchars]!= c | cdata->attribs ) { if ( vc==vconsole_current ) vc->RENDER ( vc, c ); @@ -1343,7 +1343,7 @@ TERMTYPE_PUTSTRING(string, length, vc) cdata = (struct vt220_info *)vc->data; /* A piece of saftey code */ - if ( vconsole_current->vtty == 0 ) + if ( vc->vtty == 0 ) return 0; #ifdef SIMPLE_CURSOR @@ -1364,6 +1364,7 @@ TERMTYPE_PUTSTRING(string, length, vc) cdata->flags &= ~F_LASTCHAR; #ifndef RC7500 +#ifdef DIAGNOSTIC /* Middle mouse button freezes the display while active */ while ((ReadByte(IO_MOUSE_BUTTONS) & MOUSE_BUTTON_MIDDLE) == 0); @@ -1372,7 +1373,8 @@ TERMTYPE_PUTSTRING(string, length, vc) if ((ReadByte(IO_MOUSE_BUTTONS) & MOUSE_BUTTON_LEFT) == 0) delay(5000); -#endif +#endif /* DIAGNOSTIC */ +#endif /* RC7500 */ /* Always process characters in the range of 0x00 to 0x1f */ diff --git a/sys/arch/arm32/vidc/console/vt220.c b/sys/arch/arm32/vidc/console/vt220.c index afe410b3c34f..156f2bfce0d2 100644 --- a/sys/arch/arm32/vidc/console/vt220.c +++ b/sys/arch/arm32/vidc/console/vt220.c @@ -1,4 +1,4 @@ -/* $NetBSD: vt220.c,v 1.5 1996/05/06 00:47:20 mark Exp $ */ +/* $NetBSD: vt220.c,v 1.6 1996/05/12 21:42:44 mark Exp $ */ /* * Copyright (c) 1994-1995 Melvyn Tang-Richardson @@ -1173,7 +1173,7 @@ do_render_noscroll(c, vc) { if (((vc->flags)&(LOSSY))==0) { - if ( vc->charmap[vc->xcur+vc->ycur*vc->xchars] != (c | cdata->attribs) ) + if ( vc->charmap[vc->xcur+vc->ycur*vc->xchars] != c | cdata->attribs) { if ( vc==vconsole_current ) vc->RENDER ( vc, c ); @@ -1286,7 +1286,7 @@ do_render(c, vc) { if ( cdata->irm == 0 ) { - if(vc->charmap[vc->xcur+vc->ycur*vc->xchars]!= (c | cdata->attribs) ) + if(vc->charmap[vc->xcur+vc->ycur*vc->xchars]!= c | cdata->attribs ) { if ( vc==vconsole_current ) vc->RENDER ( vc, c ); @@ -1343,7 +1343,7 @@ TERMTYPE_PUTSTRING(string, length, vc) cdata = (struct vt220_info *)vc->data; /* A piece of saftey code */ - if ( vconsole_current->vtty == 0 ) + if ( vc->vtty == 0 ) return 0; #ifdef SIMPLE_CURSOR @@ -1364,6 +1364,7 @@ TERMTYPE_PUTSTRING(string, length, vc) cdata->flags &= ~F_LASTCHAR; #ifndef RC7500 +#ifdef DIAGNOSTIC /* Middle mouse button freezes the display while active */ while ((ReadByte(IO_MOUSE_BUTTONS) & MOUSE_BUTTON_MIDDLE) == 0); @@ -1372,7 +1373,8 @@ TERMTYPE_PUTSTRING(string, length, vc) if ((ReadByte(IO_MOUSE_BUTTONS) & MOUSE_BUTTON_LEFT) == 0) delay(5000); -#endif +#endif /* DIAGNOSTIC */ +#endif /* RC7500 */ /* Always process characters in the range of 0x00 to 0x1f */