diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 08:16:23 +0000 |
commit | c86f0c7a71e7ade3e38b325c186a9cf374e0411e (patch) | |
tree | 176f04f674860c7cfae9ac5d2ff4d4e1d73cb2b7 /sys/i386/isa/pcvt/pcvt_vtf.c | |
parent | 423ba8f9bc23d93bfc244aca9b12563b1c9de90d (diff) | |
download | FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.zip FreeBSD-src-c86f0c7a71e7ade3e38b325c186a9cf374e0411e.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_vtf.c')
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_vtf.c | 298 |
1 files changed, 149 insertions, 149 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_vtf.c b/sys/i386/isa/pcvt/pcvt_vtf.c index 4f7317f..6dddd5d 100644 --- a/sys/i386/isa/pcvt/pcvt_vtf.c +++ b/sys/i386/isa/pcvt/pcvt_vtf.c @@ -81,7 +81,7 @@ void vt_stbm(struct video_state *svsp) { /* both 0 => scrolling region = entire screen */ - + if((svsp->parms[0] == 0) && (svsp->parms[1] == 0)) { svsp->cur_offset = 0; @@ -96,14 +96,14 @@ vt_stbm(struct video_state *svsp) return; /* range parm 1 */ - + if(svsp->parms[0] < 1) svsp->parms[0] = 1; else if(svsp->parms[0] > svsp->screen_rows-1) svsp->parms[0] = svsp->screen_rows-1; /* range parm 2 */ - + if(svsp->parms[1] < 2) svsp->parms[1] = 2; else if(svsp->parms[1] > svsp->screen_rows) @@ -115,10 +115,10 @@ vt_stbm(struct video_state *svsp) /* cursor to first pos */ if(svsp->m_om) - svsp->cur_offset = svsp->scrr_beg * svsp->maxcol; + svsp->cur_offset = svsp->scrr_beg * svsp->maxcol; else svsp->cur_offset = 0; - + svsp->col = 0; } @@ -131,7 +131,7 @@ vt_sgr(struct video_state *svsp) register int i = 0; u_short setcolor = 0; char colortouched = 0; - + do { switch(svsp->parms[i++]) @@ -143,15 +143,15 @@ vt_sgr(struct video_state *svsp) case 1: /* bold */ svsp->vtsgr |= VT_BOLD; break; - + case 4: /* underline */ svsp->vtsgr |= VT_UNDER; break; - + case 5: /* blinking */ svsp->vtsgr |= VT_BLINK; break; - + case 7: /* reverse */ svsp->vtsgr |= VT_INVERSE; break; @@ -159,19 +159,19 @@ vt_sgr(struct video_state *svsp) case 22: /* not bold */ svsp->vtsgr &= ~VT_BOLD; break; - + case 24: /* not underlined */ svsp->vtsgr &= ~VT_UNDER; break; - + case 25: /* not blinking */ svsp->vtsgr &= ~VT_BLINK; break; - + case 27: /* not reverse */ svsp->vtsgr &= ~VT_INVERSE; break; - + case 30: /* foreground colors */ case 31: case 32: @@ -186,7 +186,7 @@ vt_sgr(struct video_state *svsp) setcolor |= ((fgansitopc[(svsp->parms[i-1]-30) & 7]) << 8); } break; - + case 40: /* background colors */ case 41: case 42: @@ -246,7 +246,7 @@ void vt_cud(struct video_state *svsp) { register int p = svsp->parms[0]; - + if (p <= 0) p = 1; @@ -254,7 +254,7 @@ vt_cud(struct video_state *svsp) if (p <= 0) return; - + svsp->cur_offset += (svsp->maxcol * p); } @@ -264,19 +264,19 @@ vt_cud(struct video_state *svsp) void vt_cuf(struct video_state *svsp) { - register int p = svsp->parms[0]; + register int p = svsp->parms[0]; if(svsp->col == ((svsp->maxcol)-1)) /* already at right margin */ return; - + if(p <= 0) /* parameter min = 1 */ p = 1; else if(p > ((svsp->maxcol)-1)) /* parameter max = 79 */ p = ((svsp->maxcol)-1); - + if((svsp->col + p) > ((svsp->maxcol)-1))/* not more than right margin */ p = ((svsp->maxcol)-1) - svsp->col; - + svsp->cur_offset += p; svsp->col += p; } @@ -287,11 +287,11 @@ vt_cuf(struct video_state *svsp) void vt_cub(struct video_state *svsp) { - register int p = svsp->parms[0]; + register int p = svsp->parms[0]; if(svsp->col == 0) /* already at left margin ? */ return; - + if(p <= 0) /* parameter min = 1 */ p = 1; else if(p > ((svsp->maxcol)-1)) /* parameter max = 79 */ @@ -325,7 +325,7 @@ vt_clreos(struct video_state *svsp) svsp->Crtat + 1 ); break; - case 2: + case 2: fillw(user_attr | ' ', svsp->Crtat, svsp->maxcol * svsp->screen_rows); break; @@ -368,24 +368,24 @@ vt_curadr(struct video_state *svsp) { if(svsp->m_om) /* relative to scrolling region */ { - if((svsp->parms[0] == 0) && (svsp->parms[1] == 0)) + if((svsp->parms[0] == 0) && (svsp->parms[1] == 0)) { svsp->cur_offset = svsp->scrr_beg * svsp->maxcol; svsp->col = 0; svsp->abs_write = 0; return; } - + if(svsp->parms[0] <= 0) svsp->parms[0] = 1; else if(svsp->parms[0] > svsp->scrr_len) svsp->parms[0] = svsp->scrr_len; - + if(svsp->parms[1] <= 0 ) svsp->parms[1] = 1; if(svsp->parms[1] > svsp->maxcol) svsp->parms[1] = svsp->maxcol; - + svsp->cur_offset = (svsp->scrr_beg * svsp->maxcol) + ((svsp->parms[0] - 1) * svsp->maxcol) + svsp->parms[1] - 1; @@ -394,24 +394,24 @@ vt_curadr(struct video_state *svsp) } else /* relative to screen start */ { - if((svsp->parms[0] == 0) && (svsp->parms[1] == 0)) + if((svsp->parms[0] == 0) && (svsp->parms[1] == 0)) { svsp->cur_offset = 0; svsp->col = 0; svsp->abs_write = 0; return; } - + if(svsp->parms[0] <= 0) svsp->parms[0] = 1; else if(svsp->parms[0] > svsp->screen_rows) svsp->parms[0] = svsp->screen_rows; - + if(svsp->parms[1] <= 0 ) svsp->parms[1] = 1; if(svsp->parms[1] > svsp->maxcol) /* col */ svsp->parms[1] = svsp->maxcol; - + svsp->cur_offset = (((svsp->parms[0]-1)*svsp->maxcol) + (svsp->parms[1]-1)); svsp->col = svsp->parms[1]-1; @@ -434,7 +434,7 @@ vt_ris(struct video_state *svsp) fillw(user_attr | ' ', svsp->Crtat, svsp->maxcol * svsp->screen_rows); svsp->cur_offset = 0; /* cursor upper left corner */ svsp->col = 0; - svsp->row = 0; + svsp->row = 0; svsp->lnm = 0; /* CR only */ clear_dld(svsp); /* clear download charset */ vt_clearudk(svsp); /* clear user defined keys */ @@ -445,16 +445,16 @@ vt_ris(struct video_state *svsp) /*---------------------------------------------------------------------------* * DECSTR - soft terminal reset (SOFT emulator runtime reset) *---------------------------------------------------------------------------*/ -void +void vt_str(struct video_state *svsp) { int i; - + clr_parms(svsp); /* escape parameter init */ svsp->state = STATE_INIT; /* initial state */ svsp->dis_fnc = 0; /* display functions reset */ - + svsp->sc_flag = 0; /* save cursor position */ svsp->transparent = 0; /* enable control code processing */ @@ -477,7 +477,7 @@ vt_str(struct video_state *svsp) #endif svsp->scroll_lock = 0; /* reset keyboard modes */ - svsp->caps_lock = 0; + svsp->caps_lock = 0; svsp->ckm = 1; /* cursor key mode = "normal" ... */ svsp->scrr_beg = 0; /* start of scrolling region */ @@ -511,7 +511,7 @@ vt_str(struct video_state *svsp) vt_initsel(svsp); init_ufkl(svsp); /* init user fkey labels */ - init_sfkl(svsp); /* init system fkey labels */ + init_sfkl(svsp); /* init system fkey labels */ update_led(); /* update keyboard LED's */ } @@ -519,7 +519,7 @@ vt_str(struct video_state *svsp) /*---------------------------------------------------------------------------* * RI - reverse index, move cursor up *---------------------------------------------------------------------------*/ -void +void vt_ri(struct video_state *svsp) { if(svsp->cur_offset >= ((svsp->scrr_beg * svsp->maxcol) + svsp->maxcol)) @@ -545,7 +545,7 @@ vt_ind(struct video_state *svsp) *---------------------------------------------------------------------------*/ void vt_nel(struct video_state *svsp) -{ +{ if(svsp->cur_offset < (svsp->scrr_end * svsp->maxcol)) { svsp->cur_offset += (svsp->maxcol-svsp->col); @@ -574,15 +574,15 @@ vt_set_dec_priv_qm(struct video_state *svsp) case 2: /* ANM - ansi/vt52 mode */ break; - + case 3: /* COLM - column mode */ vt_col(svsp, SCR_COL132); break; - + case 4: /* SCLM - scrolling mode */ case 5: /* SCNM - screen mode */ break; - + case 6: /* OM - origin mode */ svsp->m_om = 1; break; @@ -595,7 +595,7 @@ vt_set_dec_priv_qm(struct video_state *svsp) case 8: /* ARM - auto repeat mode */ kbrepflag = 1; break; - + case 9: /* INLM - interlace mode */ case 10: /* EDM - edit mode */ case 11: /* LTM - line transmit mode */ @@ -611,7 +611,7 @@ vt_set_dec_priv_qm(struct video_state *svsp) sw_cursor(1); /* cursor on */ svsp->cursor_on = 1; break; - + case 42: /* NRCM - 7bit NRC characters */ break; } @@ -632,7 +632,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp) case 2: /* ANM - ansi/vt52 mode */ break; - + case 3: /* COLM - column mode */ vt_col(svsp, SCR_COL80); break; @@ -640,7 +640,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp) case 4: /* SCLM - scrolling mode */ case 5: /* SCNM - screen mode */ break; - + case 6: /* OM - origin mode */ svsp->m_om = 0; break; @@ -653,7 +653,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp) case 8: /* ARM - auto repeat mode */ kbrepflag = 0; break; - + case 9: /* INLM - interlace mode */ case 10: /* EDM - edit mode */ case 11: /* LTM - line transmit mode */ @@ -669,7 +669,7 @@ vt_reset_dec_priv_qm(struct video_state *svsp) sw_cursor(0); /* cursor off */ svsp->cursor_on = 0; break; - + case 42: /* NRCM - 7bit NRC characters */ break; } @@ -688,7 +688,7 @@ vt_set_ansi(struct video_state *svsp) case 2: /* KAM - keyboard action mode */ case 3: /* CRM - Control Representation mode */ break; - + case 4: /* IRM - insert replacement mode */ svsp->irm = 1; /* Insert mode */ break; @@ -707,7 +707,7 @@ vt_set_ansi(struct video_state *svsp) case 18: /* TSM - tabulation stop mode */ case 19: /* EBM - editing boundary mode */ break; - + case 20: /* LNM - line feed / newline mode */ svsp->lnm = 1; break; @@ -727,11 +727,11 @@ vt_reset_ansi(struct video_state *svsp) case 2: /* KAM - keyboard action mode */ case 3: /* CRM - Control Representation mode */ break; - + case 4: /* IRM - insert replacement mode */ svsp->irm = 0; /* Replace mode */ break; - + case 5: /* SRTM - status report transfer mode */ case 6: /* ERM - erasue mode */ case 7: /* VEM - vertical editing mode */ @@ -746,7 +746,7 @@ vt_reset_ansi(struct video_state *svsp) case 18: /* TSM - tabulation stop mode */ case 19: /* EBM - editing boundary mode */ break; - + case 20: /* LNM - line feed / newline mode */ svsp->lnm = 0; break; @@ -756,7 +756,7 @@ vt_reset_ansi(struct video_state *svsp) /*---------------------------------------------------------------------------* * clear tab stop(s) *---------------------------------------------------------------------------*/ -void +void vt_clrtab(struct video_state *svsp) { int i; @@ -785,10 +785,10 @@ vt_sc(struct video_state *svsp) svsp->sc_om = svsp->m_om; svsp->sc_G0 = svsp->G0; svsp->sc_G1 = svsp->G1; - svsp->sc_G2 = svsp->G2; + svsp->sc_G2 = svsp->G2; svsp->sc_G3 = svsp->G3; svsp->sc_GL = svsp->GL; - svsp->sc_GR = svsp->GR; + svsp->sc_GR = svsp->GR; svsp->sc_sel = svsp->selchar; svsp->sc_vtsgr = svsp->vtsgr; } @@ -827,7 +827,7 @@ vt_designate(struct video_state *svsp) { u_short *ctp = NULL; u_char ch; - + if(svsp->whichi == 1) ch = svsp->which[0]; else @@ -836,7 +836,7 @@ vt_designate(struct video_state *svsp) if(svsp->dld_id[0] == '\0') return; - + if(!(((adaptor_type == EGA_ADAPTOR) || (adaptor_type == VGA_ADAPTOR)) && (vgacs[svsp->vga_charset].secondloaded))) @@ -852,10 +852,10 @@ vt_designate(struct video_state *svsp) #ifdef HAVECSE_DOWNLOADABLE ctp = cse_downloadable; swcsp(svsp, ctp); -#endif +#endif return; } - + if(((adaptor_type == EGA_ADAPTOR) || (adaptor_type == VGA_ADAPTOR)) && (vgacs[svsp->vga_charset].secondloaded)) { @@ -864,10 +864,10 @@ vt_designate(struct video_state *svsp) #ifdef HAVECSE_DOWNLOADABLE ctp = cse_downloadable; swcsp(svsp, ctp); -#endif +#endif return; } - + switch(ch) { case 'A': /* British or ISO-Latin-1 */ @@ -881,7 +881,7 @@ vt_designate(struct video_state *svsp) ctp = cse_british; #endif break; - + case STATE_MINUS: /* designate G1 (96)*/ case STATE_DOT: /* designate G2 (96)*/ case STATE_SLASH: /* designate G3 (96)*/ @@ -891,11 +891,11 @@ vt_designate(struct video_state *svsp) break; } break; - + case 'B': /* USASCII */ #ifdef HAVECSE_ASCII ctp = cse_ascii; -#endif +#endif break; case 'C': /* Finnish */ @@ -916,87 +916,87 @@ vt_designate(struct video_state *svsp) case '7': /* Swedish */ #ifdef HAVECSE_SWEDISH ctp = cse_swedish; -#endif +#endif break; - + case 'K': /* German */ #ifdef HAVECSE_GERMAN ctp = cse_german; -#endif +#endif break; - + case 'Q': /* French Canadien */ #ifdef HAVECSE_FRENCHCANADA ctp = cse_frenchcanada; -#endif +#endif break; case 'R': /* French */ #ifdef HAVECSE_FRENCH ctp = cse_french; -#endif +#endif break; case 'Y': /* Italian */ #ifdef HAVECSE_ITALIAN ctp = cse_italian; -#endif +#endif break; case 'Z': /* Spanish */ #ifdef HAVECSE_SPANISH ctp = cse_spanish; -#endif +#endif break; - + case '0': /* special graphics */ #ifdef HAVECSE_SPECIAL ctp = cse_special; -#endif +#endif break; case '1': /* alternate ROM */ #ifdef HAVECSE_ALTERNATEROM1 ctp = cse_alternaterom1; -#endif +#endif break; case '2': /* alt ROM, spec graphics */ #ifdef HAVECSE_ALTERNATEROM2 ctp = cse_alternaterom2; -#endif +#endif break; case '3': /* HP Roman 8, upper 128 chars*/ #ifdef HAVECSE_ROMAN8 ctp = cse_roman8; -#endif +#endif break; case '4': /* Dutch */ #ifdef HAVECSE_DUTCH ctp = cse_dutch; -#endif +#endif break; case '<': /* DEC Supplemental */ #ifdef HAVECSE_SUPPLEMENTAL ctp = cse_supplemental; -#endif +#endif break; case '=': /* Swiss */ #ifdef HAVECSE_SWISS ctp = cse_swiss; -#endif +#endif break; case '>': /* DEC Technical */ #ifdef HAVECSE_TECHNICAL ctp = cse_technical; -#endif +#endif break; - + default: break; } @@ -1016,7 +1016,7 @@ vt_designate(struct video_state *svsp) ctp = csd_british; #endif break; - + case STATE_MINUS: /* designate G1 (96)*/ case STATE_DOT: /* designate G2 (96)*/ case STATE_SLASH: /* designate G3 (96)*/ @@ -1026,11 +1026,11 @@ vt_designate(struct video_state *svsp) break; } break; - + case 'B': /* USASCII */ #ifdef HAVECSD_ASCII ctp = csd_ascii; -#endif +#endif break; case 'C': /* Finnish */ @@ -1051,94 +1051,94 @@ vt_designate(struct video_state *svsp) case '7': /* Swedish */ #ifdef HAVECSD_SWEDISH ctp = csd_swedish; -#endif +#endif break; - + case 'K': /* German */ #ifdef HAVECSD_GERMAN ctp = csd_german; -#endif +#endif break; - + case 'Q': /* French Canadien */ #ifdef HAVECSD_FRENCHCANADA ctp = csd_frenchcanada; -#endif +#endif break; case 'R': /* French */ #ifdef HAVECSD_FRENCH ctp = csd_french; -#endif +#endif break; case 'Y': /* Italian */ #ifdef HAVECSD_ITALIAN ctp = csd_italian; -#endif +#endif break; case 'Z': /* Spanish */ #ifdef HAVECSD_SPANISH ctp = csd_spanish; -#endif +#endif break; - + case '0': /* special graphics */ #ifdef HAVECSD_SPECIAL ctp = csd_special; -#endif +#endif break; case '1': /* alternate ROM */ #ifdef HAVECSD_ALTERNATEROM1 ctp = csd_alternaterom1; -#endif +#endif break; case '2': /* alt ROM, spec graphics */ #ifdef HAVECSD_ALTERNATEROM2 ctp = csd_alternaterom2; -#endif +#endif break; case '3': /* HP Roman 8, upper 128 chars*/ #ifdef HAVECSD_ROMAN8 ctp = csd_roman8; -#endif +#endif break; case '4': /* Dutch */ #ifdef HAVECSD_DUTCH ctp = csd_dutch; -#endif +#endif break; case '<': /* DEC Supplemental */ #ifdef HAVECSD_SUPPLEMENTAL ctp = csd_supplemental; -#endif +#endif break; case '=': /* Swiss */ #ifdef HAVECSD_SWISS ctp = csd_swiss; -#endif +#endif break; case '>': /* DEC Technical */ #ifdef HAVECSD_TECHNICAL ctp = csd_technical; -#endif +#endif break; - + default: break; } } swcsp(svsp, ctp); } - + /*---------------------------------------------------------------------------* * device attributes *---------------------------------------------------------------------------*/ @@ -1146,7 +1146,7 @@ void vt_da(struct video_state *svsp) { static u_char *response = (u_char *)DA_VT220; - + svsp->report_chars = response; svsp->report_count = 18; respond(svsp); @@ -1173,13 +1173,13 @@ vt_aln(struct video_state *svsp) svsp->cur_offset = 0; /* reset everything ! */ svsp->col = 0; - svsp->row = 0; + svsp->row = 0; } /*---------------------------------------------------------------------------* * request terminal parameters *---------------------------------------------------------------------------*/ -void +void vt_reqtparm(struct video_state *svsp) { static u_char *answr = (u_char *)"\033[3;1;1;120;120;1;0x"; @@ -1210,7 +1210,7 @@ vt_dsr(struct video_state *svsp) static u_char *langanswr = (u_char *)"\033[?27;1n"; /* North American*/ static u_char buffer[16]; int i = 0; - + switch(svsp->parms[0]) { case 5: /* return status */ @@ -1225,13 +1225,13 @@ vt_dsr(struct video_state *svsp) if((svsp->row+1) > 10) buffer[i++] = ((svsp->row+1) / 10) + '0'; buffer[i++] = ((svsp->row+1) % 10) + '0'; - buffer[i++] = ';'; + buffer[i++] = ';'; if((svsp->col+1) > 10) buffer[i++] = ((svsp->col+1) / 10) + '0'; buffer[i++] = ((svsp->col+1) % 10) + '0'; buffer[i++] = 'R'; buffer[i++] = '\0'; - + svsp->report_chars = buffer; svsp->report_count = i; respond(svsp); @@ -1261,13 +1261,13 @@ vt_dsr(struct video_state *svsp) } /*---------------------------------------------------------------------------* - * IL - insert line + * IL - insert line *---------------------------------------------------------------------------*/ -void +void vt_il(struct video_state *svsp) { register int p = svsp->parms[0]; - + if((svsp->row >= svsp->scrr_beg) && (svsp->row <= svsp->scrr_end)) { if(p <= 0) @@ -1304,7 +1304,7 @@ vt_ic(struct video_state *svsp) p = 1; else if(p > svsp->maxcol-svsp->col) p = svsp->maxcol-svsp->col; - + while(p--) { bcopy((svsp->Crtat + svsp->cur_offset), @@ -1323,7 +1323,7 @@ void vt_dl(struct video_state *svsp) { register int p = svsp->parms[0]; - + if((svsp->row >= svsp->scrr_beg) && (svsp->row <= svsp->scrr_end)) { if(p <= 0) @@ -1346,7 +1346,7 @@ vt_dl(struct video_state *svsp) svsp->Crtat + ((svsp->scrr_end-p+1) * svsp->maxcol), p * svsp->maxcol); } - } + } } /*---------------------------------------------------------------------------* @@ -1361,7 +1361,7 @@ vt_dch(struct video_state *svsp) p = 1; else if(p > svsp->maxcol-svsp->col) p = svsp->maxcol-svsp->col; - + while(p--) { bcopy((svsp->Crtat + svsp->cur_offset)+1, @@ -1380,12 +1380,12 @@ void vt_su(struct video_state *svsp) { register int p = svsp->parms[0]; - + if(p <= 0) p = 1; else if(p > svsp->screen_rows-1) p = svsp->screen_rows-1; - + roll_up(svsp, p); } @@ -1396,12 +1396,12 @@ void vt_sd(struct video_state *svsp) { register int p = svsp->parms[0]; - + if(p <= 0) p = 1; else if(p > svsp->screen_rows-1) p = svsp->screen_rows-1; - + roll_down(svsp, p); } @@ -1417,7 +1417,7 @@ vt_ech(struct video_state *svsp) p = 1; else if(p > svsp->maxcol-svsp->col) p = svsp->maxcol-svsp->col; - + fillw(user_attr | ' ', (svsp->Crtat + svsp->cur_offset), p); } @@ -1457,9 +1457,9 @@ vt_dcsentry(U_char ch, struct video_state *svsp) svsp->parms[svsp->parmi] *= 10; svsp->parms[svsp->parmi] += (ch -'0'); break; - + case ';': /* next parameter */ - svsp->parmi = + svsp->parmi = (svsp->parmi+1 < MAXPARMS) ? svsp->parmi+1 : svsp->parmi; break; @@ -1508,7 +1508,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp) case 0x1b: /* ESC */ svsp->dcs_state = DCS_UDK_ESC; break; - + default: svsp->transparent = 0; svsp->state = STATE_INIT; @@ -1594,7 +1594,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp) case 0x1b: /* ESC */ svsp->dcs_state = DCS_UDK_ESC; break; - + default: svsp->transparent = 0; svsp->state = STATE_INIT; @@ -1602,7 +1602,7 @@ vt_dcsentry(U_char ch, struct video_state *svsp) break; } break; - + case DCS_UDK_ESC: /* DCS ... | fkey/def ... ESC */ switch(ch) { @@ -1620,13 +1620,13 @@ vt_dcsentry(U_char ch, struct video_state *svsp) break; } break; - + case DCS_DLD_DSCS: /* got DCS ... { */ if(ch >= ' ' && ch <= '/') /* intermediates ... */ { svsp->dld_dscs[svsp->dld_dscsi] = ch; - svsp->dld_id[svsp->dld_dscsi] = ch; + svsp->dld_id[svsp->dld_dscsi] = ch; if(svsp->dld_dscsi >= DSCS_LENGTH) { svsp->transparent = 0; @@ -1661,16 +1661,16 @@ vt_dcsentry(U_char ch, struct video_state *svsp) case 0x1b: /* ESC */ svsp->dcs_state = DCS_DLD_ESC; break; - + case '/': /* sixel upper / lower divider */ svsp->dld_sixel_lower = 1; break; - + case ';': /* character divider */ vt_dld(svsp); svsp->parms[1]++; /* next char */ break; - + default: if (svsp->dld_sixel_lower) { @@ -1727,7 +1727,7 @@ vt_udk(struct video_state *svsp) { int key, start, max, i; int usedff = 0; - + if(svsp->parms[0] != 1) /* clear all ? */ { vt_clearudk(svsp); @@ -1741,7 +1741,7 @@ vt_udk(struct video_state *svsp) } key = svsp->udk_fnckey - 17; /* index into table */ - + if(svsp->ukt.length[key] == 0) /* never used ? */ { if(svsp->udkff < MAXUDKDEF-2) /* space available ? */ @@ -1770,7 +1770,7 @@ vt_udk(struct video_state *svsp) } max--; /* adjust for tailing '\0' */ - + for(i = 0; i < max && i < svsp->udk_defi; i++) svsp->udkbuf[start++] = svsp->udk_def[i]; @@ -1778,7 +1778,7 @@ vt_udk(struct video_state *svsp) svsp->ukt.length[key] = i+1; /* count for tailing '\0' */ if(usedff) svsp->udkff += (i+2); /* new start location */ - + init_udk(svsp); } @@ -1813,7 +1813,7 @@ vt_dld(struct video_state *svsp) else return; - svsp->parms[1] = (svsp->parms[1] < 1) ? 1 : + svsp->parms[1] = (svsp->parms[1] < 1) ? 1 : ((svsp->parms[1] > 0x7E) ? 0x7E : svsp->parms[1]); if(svsp->parms[2] != 1) /* Erase all characters ? */ @@ -1875,7 +1875,7 @@ void vt_initsel(struct video_state *svsp) { register int i; - + for(i = 0;i < MAXDECSCA;i++) svsp->decsca[i] = 0; } @@ -1924,7 +1924,7 @@ vt_sed(struct video_state *svsp) (svsp->Crtat + svsp->cur_offset) - svsp->Crtat + 1 ); break; - case 2: + case 2: selective_erase(svsp, svsp->Crtat, svsp->maxcol * svsp->screen_rows); break; @@ -1973,7 +1973,7 @@ roll_up(struct video_state *svsp, int n) if(vsp == svsp && !(vsp->vt_status & VT_GRAFX)) #else if(vsp == svsp) -#endif +#endif { outb(addr_6845, CRTC_STARTADRH); @@ -1989,7 +1989,7 @@ roll_up(struct video_state *svsp, int n) svsp->Crtat + (svsp->scrr_beg * svsp->maxcol), svsp->maxcol * (svsp->scrr_len - n) * CHR ); } - + fillw( user_attr | ' ', svsp->Crtat + ((svsp->scrr_end - n + 1) * svsp->maxcol), n * svsp->maxcol); @@ -2006,14 +2006,14 @@ roll_down(struct video_state *svsp, int n) { #if (PCVT_NOFASTSCROLL==0) - + if(svsp->scrr_beg == 0 && /* if scroll region is whole screen */ svsp->scrr_len == svsp->screen_rows && (svsp != vsp || /* and either running in memory */ (svsp->screen_rows == svsp->screen_rowsize && /* or no fkeys */ adaptor_type != MDA_ADAPTOR))) /* and not on MDA/Hercules */ { - u_short *Memory = + u_short *Memory = #if PCVT_USL_VT_COMPAT (vsp != svsp || (vsp->vt_status & VT_GRAFX)) ? @@ -2039,7 +2039,7 @@ roll_down(struct video_state *svsp, int n) if(vsp == svsp && !(vsp->vt_status & VT_GRAFX)) #else if(vsp == svsp) -#endif +#endif { outb(addr_6845, CRTC_STARTADRH); @@ -2055,7 +2055,7 @@ roll_down(struct video_state *svsp, int n) svsp->Crtat + ((svsp->scrr_beg + n) * svsp->maxcol), svsp->maxcol * (svsp->scrr_len - n) * CHR ); } - + fillw( user_attr | ' ', svsp->Crtat + (svsp->scrr_beg * svsp->maxcol), n * svsp->maxcol); @@ -2072,7 +2072,7 @@ swcsp(struct video_state *svsp, u_short *ctp) { if(ctp == NULL) return; - + switch(svsp->state) { case STATE_BROPN: /* designate G0 */ @@ -2138,7 +2138,7 @@ clear_dld(struct video_state *svsp) vgacharset = vgacs[svsp->vga_charset].secondloaded; else return; - + for(i=0;i < 16;i++) /* A zeroed character, vt220 has inverted '?' */ vgachar[i] = 0x00; @@ -2170,7 +2170,7 @@ static void selective_erase(struct video_state *svsp, u_short *pcrtat, int length) { register int i, j; - + for(j = pcrtat - svsp->Crtat, i = 0;i < length;i++,pcrtat++) { if(!(svsp->decsca[INT_INDEX(j+i)] & (1 << BIT_INDEX(j+i)))) |