diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 03:57:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 03:57:47 +0000 |
commit | 4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (patch) | |
tree | 15a9c7203efd47ba6dde2896fdb6327dddd4547f /usr.sbin/pcvt | |
parent | 30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff) | |
download | FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/pcvt')
-rw-r--r-- | usr.sbin/pcvt/cursor/cursor.c | 16 | ||||
-rw-r--r-- | usr.sbin/pcvt/demo/playvt.c | 8 | ||||
-rw-r--r-- | usr.sbin/pcvt/fed/edit.c | 66 | ||||
-rw-r--r-- | usr.sbin/pcvt/fed/fed.c | 22 | ||||
-rw-r--r-- | usr.sbin/pcvt/fed/fed.h | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/fed/misc.c | 50 | ||||
-rw-r--r-- | usr.sbin/pcvt/fed/select.c | 50 | ||||
-rw-r--r-- | usr.sbin/pcvt/fontedit/fontedit.c | 56 | ||||
-rw-r--r-- | usr.sbin/pcvt/ispcvt/ispcvt.c | 20 | ||||
-rw-r--r-- | usr.sbin/pcvt/kcon/kcon.c | 90 | ||||
-rw-r--r-- | usr.sbin/pcvt/keycap/keycap.c | 4 | ||||
-rw-r--r-- | usr.sbin/pcvt/loadfont/loadfont.c | 38 | ||||
-rw-r--r-- | usr.sbin/pcvt/mcon/mcon.c | 20 | ||||
-rw-r--r-- | usr.sbin/pcvt/scon/scon.c | 76 | ||||
-rw-r--r-- | usr.sbin/pcvt/set2061/ICD2061Aalt.c | 4 | ||||
-rw-r--r-- | usr.sbin/pcvt/set2061/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/set2061/compiler.h | 10 | ||||
-rw-r--r-- | usr.sbin/pcvt/set2061/main.c | 10 | ||||
-rw-r--r-- | usr.sbin/pcvt/userkeys/vt220keys.c | 30 | ||||
-rw-r--r-- | usr.sbin/pcvt/vttest/esc.c | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/vttest/main.c | 4 |
21 files changed, 290 insertions, 290 deletions
diff --git a/usr.sbin/pcvt/cursor/cursor.c b/usr.sbin/pcvt/cursor/cursor.c index 58fb5c7..94ce1d7 100644 --- a/usr.sbin/pcvt/cursor/cursor.c +++ b/usr.sbin/pcvt/cursor/cursor.c @@ -43,7 +43,7 @@ static char *id = * -hm adding option -d <device> * *---------------------------------------------------------------------------*/ - + #include <stdio.h> #include <fcntl.h> #include <sys/stat.h> @@ -67,7 +67,7 @@ char *argv[]; int end = -1; int dflag = -1; char *device; - + while( (c = getopt(argc, argv, "d:n:s:e:")) != EOF) { switch(c) @@ -76,15 +76,15 @@ char *argv[]; device = optarg; dflag = 1; break; - + case 'n': screen = atoi(optarg); break; - + case 's': start = atoi(optarg); break; - + case 'e': end = atoi(optarg); break; @@ -96,7 +96,7 @@ char *argv[]; } } - if(start == -1 || end == -1) + if(start == -1 || end == -1) usage(); if(dflag == -1) @@ -118,7 +118,7 @@ char *argv[]; if(screen == -1) { struct stat stat; - + if((fstat(fd, &stat)) == -1) { char buffer[80]; @@ -130,7 +130,7 @@ char *argv[]; screen = minor(stat.st_rdev); } - + cursorshape.start = start; cursorshape.end = end; cursorshape.screen_no = screen; diff --git a/usr.sbin/pcvt/demo/playvt.c b/usr.sbin/pcvt/demo/playvt.c index d0a391f..a3ac9fb 100644 --- a/usr.sbin/pcvt/demo/playvt.c +++ b/usr.sbin/pcvt/demo/playvt.c @@ -40,7 +40,7 @@ static char *id = * -hm want to see my xmas greeting ... :-) * *---------------------------------------------------------------------------*/ - + #include <stdio.h> #include <unistd.h> @@ -58,7 +58,7 @@ char *argv[]; int delay = 0; int fflag = -1; char *filename; - + while( (c = getopt(argc, argv, "d:f:")) != EOF) { switch(c) @@ -66,7 +66,7 @@ char *argv[]; case 'd': delay = atoi(optarg); break; - + case 'f': filename = optarg; fflag = 1; @@ -90,7 +90,7 @@ char *argv[]; exit(1); } } - + while((c = getc(fp)) != EOF) { putchar(c); diff --git a/usr.sbin/pcvt/fed/edit.c b/usr.sbin/pcvt/fed/edit.c index c15a90c..67d616b 100644 --- a/usr.sbin/pcvt/fed/edit.c +++ b/usr.sbin/pcvt/fed/edit.c @@ -14,7 +14,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Hellmuth Michaelis. - * 4. The name of the developer may not be used to endorse or promote + * 4. The name of the developer may not be used to endorse or promote * products derived from this software without specific prior written * permission. * @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * edit.c, 3.00, last edit-date: [Sun Jan 2 20:08:27 1994] + * edit.c, 3.00, last edit-date: [Sun Jan 2 20:08:27 1994] */ /*--------------------------------------------------------------------------- @@ -57,13 +57,13 @@ static int pen; void edit_mode(void) { mvwprintw(cmd_win,1,1,"(W)hite "); - mvwprintw(cmd_win,2,1,"(Black "); + mvwprintw(cmd_win,2,1,"(Black "); mvwprintw(cmd_win,3,1,"(I)nvert "); mvwprintw(cmd_win,4,1,"(R)ow BLACK "); mvwprintw(cmd_win,5,1,"(r)ow WHITE "); mvwprintw(cmd_win,6,1,"(C)ol BLACK "); - mvwprintw(cmd_win,7,1,"(c)ol WHITE "); - mvwprintw(cmd_win,8,1,"(Q)uit/Save "); + mvwprintw(cmd_win,7,1,"(c)ol WHITE "); + mvwprintw(cmd_win,8,1,"(Q)uit/Save "); mvwprintw(cmd_win,9 ,1,"e(X)it/undo "); mvwprintw(cmd_win,10,1,"Pen (U)p "); @@ -73,7 +73,7 @@ void edit_mode(void) mvwprintw(cmd_win,14,1,"(^N)ext Line"); mvwprintw(cmd_win,15,1,"(^F)orwd Col"); mvwprintw(cmd_win,16,1,"(^B)ack Col"); - wrefresh(cmd_win); + wrefresh(cmd_win); } /*---------------------------------------------------------------------------* @@ -88,23 +88,23 @@ int edit(void) c = r = 0; pen = UP; - + for(;;) { if(pen == DOWN) dis_cmd(" Edit Mode, the Pen is DOWN"); else - dis_cmd(" Edit Mode, the Pen is UP"); - + dis_cmd(" Edit Mode, the Pen is UP"); + l = ((mvwinch(ch_win,(r+1),(c+1))) & A_CHARTEXT); wattron(ch_win,A_REVERSE); mvwprintw(ch_win,(r+1),(c+1),"%c",l); - wattroff(ch_win,A_REVERSE); + wattroff(ch_win,A_REVERSE); wmove(ch_win,(r+1),(c+1)); wrefresh(ch_win); k_ch = wgetch(ch_win); - + switch(k_ch) { case K_LEFT: @@ -182,33 +182,33 @@ int edit(void) case 'W': setchr(WHITE); break; - + case 'b': case 'B': setchr(BLACK); break; - + case 'i': case 'I': invert(); break; - + case 'r': setrow(WHITE); break; - + case 'R': setrow(BLACK); break; - + case 'c': setcol(WHITE); break; - + case 'C': setcol(BLACK); break; - + case 'u': case 'U': pen = UP; @@ -218,11 +218,11 @@ int edit(void) case 'D': pen = DOWN; break; - + default: beep(); break; - + } } } @@ -237,12 +237,12 @@ void normal_ch(int r, int c) if(pen == DOWN) mvwprintw(ch_win,(r+1),(c+1),"*"); else - mvwprintw(ch_win,(r+1),(c+1),"%c",l); + mvwprintw(ch_win,(r+1),(c+1),"%c",l); wmove(ch_win,(r+1),(c+1)); } /*---------------------------------------------------------------------------* - * + * *---------------------------------------------------------------------------*/ void chg_pt(int r, int c) { @@ -262,7 +262,7 @@ void chg_pt(int r, int c) void invert(void) { int r,c; - + r = 1; while(r <= ch_height) @@ -273,7 +273,7 @@ void invert(void) if(WHITE == mvwinch(ch_win, r, c)) mvwaddch(ch_win, r, c, BLACK); else - mvwaddch(ch_win, r, c, WHITE); + mvwaddch(ch_win, r, c, WHITE); c++; } r++; @@ -286,15 +286,15 @@ void invert(void) void setchr(char type) { int r,c; - + r = 1; - + while(r <= ch_height) { c = 1; while(c <= ch_width) { - mvwaddch(ch_win, r, c, type); + mvwaddch(ch_win, r, c, type); c++; } r++; @@ -308,13 +308,13 @@ void setrow(char type) { int r,c; - getyx(ch_win,r,c); + getyx(ch_win,r,c); c = 1; - + while(c <= ch_width) { - mvwaddch(ch_win, r, c, type); + mvwaddch(ch_win, r, c, type); c++; } } @@ -326,13 +326,13 @@ void setcol(char type) { int r,c; - getyx(ch_win,r,c); + getyx(ch_win,r,c); r = 1; - + while(r <= ch_height) { - mvwaddch(ch_win, r, c, type); + mvwaddch(ch_win, r, c, type); r++; } } diff --git a/usr.sbin/pcvt/fed/fed.c b/usr.sbin/pcvt/fed/fed.c index aa577ab..d2fa4f3 100644 --- a/usr.sbin/pcvt/fed/fed.c +++ b/usr.sbin/pcvt/fed/fed.c @@ -14,7 +14,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Hellmuth Michaelis. - * 4. The name of the developer may not be used to endorse or promote + * 4. The name of the developer may not be used to endorse or promote * products derived from this software without specific prior written * permission. * @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * fed.c, 3.00, last edit-date: [Sun Jan 2 20:08:45 1994] + * fed.c, 3.00, last edit-date: [Sun Jan 2 20:08:45 1994] */ /*--------------------------------------------------------------------------- @@ -53,7 +53,7 @@ void main(int argc, char *argv[]) int i; int row, col; int ret; - + if(argc != 2) { fprintf(stderr,"EGA/VGA Fonteditor, Rel 1.00\n"); @@ -81,10 +81,10 @@ void main(int argc, char *argv[]) if(ch_width == WIDTH16) addstr("1234567890123456"); else - addstr("12345678"); + addstr("12345678"); /* charcater vertical ruler */ - + for(i=1; i < ch_height+1; i++) mvprintw((WINROW+i), (CHCOL + ((WIDTH16 - ch_width)/2) - 2), "%2d", i); @@ -112,19 +112,19 @@ void main(int argc, char *argv[]) cmd_win = newwin(((WSIZE)+(2*WBORDER)),(CMDSIZE+(2*WBORDER)), WINROW,CMDCOL); - keypad(cmd_win,TRUE); + keypad(cmd_win,TRUE); idlok(cmd_win, TRUE); box(cmd_win,'|','-'); sel_mode(); - + /* character font window */ ch_win = newwin((ch_height+(2*WBORDER)),(ch_width+(2*WBORDER)), WINROW, CHCOL+((WIDTH16 - ch_width)/2)); keypad(ch_win,TRUE); idlok(ch_win, TRUE); - + box(ch_win,'|','-'); wrefresh(ch_win); @@ -132,7 +132,7 @@ void main(int argc, char *argv[]) set_win = newwin((WSIZE+(2*WBORDER)),((WSIZE*2)+(2*WBORDER)), WINROW,SETCOL); /* whole character set */ - keypad(set_win,TRUE); + keypad(set_win,TRUE); idlok(set_win, TRUE); box(set_win,'|','-'); @@ -152,10 +152,10 @@ void main(int argc, char *argv[]) wmove(set_win,1,1); wrefresh(set_win); -/* start */ +/* start */ clr_cmd(); - + curchar = 0; if((ret = selectc()) == 1) diff --git a/usr.sbin/pcvt/fed/fed.h b/usr.sbin/pcvt/fed/fed.h index 27a32c3..0911d37 100644 --- a/usr.sbin/pcvt/fed/fed.h +++ b/usr.sbin/pcvt/fed/fed.h @@ -14,7 +14,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Hellmuth Michaelis. - * 4. The name of the developer may not be used to endorse or promote + * 4. The name of the developer may not be used to endorse or promote * products derived from this software without specific prior written * permission. * diff --git a/usr.sbin/pcvt/fed/misc.c b/usr.sbin/pcvt/fed/misc.c index a0dff32..c6707ba 100644 --- a/usr.sbin/pcvt/fed/misc.c +++ b/usr.sbin/pcvt/fed/misc.c @@ -14,7 +14,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Hellmuth Michaelis. - * 4. The name of the developer may not be used to endorse or promote + * 4. The name of the developer may not be used to endorse or promote * products derived from this software without specific prior written * permission. * @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * misc.c, 3.00, last edit-date: [Sun Jan 2 20:09:21 1994] + * misc.c, 3.00, last edit-date: [Sun Jan 2 20:09:21 1994] */ /*--------------------------------------------------------------------------- @@ -84,9 +84,9 @@ void readfont(char *filename) struct stat sbuf, *sbp; int ret; char buffer[1024]; - + sbp = &sbuf; - + if((in = fopen(filename, "r")) == NULL) { sprintf(buffer, "cannot open file %s for reading", filename); @@ -107,31 +107,31 @@ void readfont(char *filename) ch_height = HEIGHT8X8; ch_width = WIDTH8; break; - + case FONT8X10: ch_height = HEIGHT8X10; ch_width = WIDTH8; break; - + case FONT8X14: ch_height = HEIGHT8X14; ch_width = WIDTH8; break; - + case FONT8X16: ch_height = HEIGHT8X16; ch_width = WIDTH8; break; - + case FONT16X16: ch_height = HEIGHT16X16; ch_width = WIDTH16; break; - + default: fprintf(stderr,"error, file %s is no valid font file, size=%d\n",filename,sbp->st_size); exit(1); - } + } if((fonttab = (unsigned char *)malloc((size_t)sbp->st_size)) == NULL) { @@ -147,7 +147,7 @@ void readfont(char *filename) sprintf(buffer,"error reading file %s, size = %d, ret = %d\n",filename,sbp->st_size, ret); perror(buffer); exit(1); - } + } } /*---------------------------------------------------------------------------* @@ -158,12 +158,12 @@ void writefont() FILE *in, *out; int ret; char buffer[1024]; - + if((in = fopen(lfilename, "r")) != NULL) { int c; char wfn[1024]; - + strcpy(wfn, lfilename); strcat(wfn, ".BAK"); if((out = fopen(wfn, "w")) == NULL) @@ -179,7 +179,7 @@ void writefont() fclose(out); fclose(in); } - + if((out = fopen(lfilename, "w")) == NULL) { sprintf(buffer, "cannot open file %s for writing", lfilename); @@ -192,7 +192,7 @@ void writefont() sprintf(buffer,"error writing file %s, size=%d, ret=%d\n",lfilename,lfilesize, ret); perror(buffer); exit(1); - } + } } /*---------------------------------------------------------------------------* @@ -223,7 +223,7 @@ void move_ch(int src, int dst) { unsigned char *s, *d; int offset = 0; - + if(ch_width == WIDTH16) offset = 2; else @@ -231,7 +231,7 @@ void move_ch(int src, int dst) s = &(fonttab[ch_height * offset * src]); d = &(fonttab[ch_height * offset * dst]); - + bcopy(s, d, (ch_height*offset)); /* src -> dst */ } @@ -243,7 +243,7 @@ void xchg_ch(int src, int dst) unsigned char *s, *d; unsigned char buf[32]; int offset = 0; - + if(ch_width == WIDTH16) offset = 2; else @@ -251,7 +251,7 @@ void xchg_ch(int src, int dst) s = &(fonttab[ch_height * offset * src]); d = &(fonttab[ch_height * offset * dst]); - + bcopy(s, buf, (ch_height*offset)); /* src -> tmp */ bcopy(d, s, (ch_height*offset)); /* dst -> src */ bcopy(buf, d, (ch_height*offset)); /* tmp -> dst */ @@ -266,19 +266,19 @@ void display(int no) char line[32]; int ln_no; unsigned char hibyte; - unsigned char lobyte; + unsigned char lobyte; int offset; int r; offset = 0; r = 1; lobyte = 0; - + if(ch_width == WIDTH16) fontchar = &(fonttab[ch_height * 2 * no]); else fontchar = &(fonttab[ch_height * no]); - + for (ln_no = 0; ln_no < ch_height; ln_no++) { hibyte = *(fontchar + (offset++)); @@ -287,7 +287,7 @@ void display(int no) { lobyte = *(fontchar + offset++); } - + strcpy(line,bitmask[(int)((hibyte >> 4) & 0x0f)]); strcat(line,bitmask[(int)(hibyte & 0x0f)]); @@ -317,7 +317,7 @@ void save_ch(void) int r, c; unsigned short byte; unsigned short shift; - + if(ch_width == WIDTH16) offset = 2; else @@ -326,7 +326,7 @@ void save_ch(void) s = &(fonttab[ch_height * offset * curchar]); r = 1; - + while(r <= ch_height) { c = 1; diff --git a/usr.sbin/pcvt/fed/select.c b/usr.sbin/pcvt/fed/select.c index 6b9d385..b6993bb 100644 --- a/usr.sbin/pcvt/fed/select.c +++ b/usr.sbin/pcvt/fed/select.c @@ -14,7 +14,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Hellmuth Michaelis. - * 4. The name of the developer may not be used to endorse or promote + * 4. The name of the developer may not be used to endorse or promote * products derived from this software without specific prior written * permission. * @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * select.c, 3.00, last edit-date: [Sun Jan 2 20:09:36 1994] + * select.c, 3.00, last edit-date: [Sun Jan 2 20:09:36 1994] */ /*--------------------------------------------------------------------------- @@ -78,14 +78,14 @@ int selectc() int ret; char h, l; unsigned int k_ch; - + c = (curchar / 16); r = (curchar % 16); for(;;) { dis_cmd(" Select Character"); - + sel_mode(); curchar = r + (c*16); @@ -96,12 +96,12 @@ int selectc() l = ((mvwinch(set_win,(r+1),((c*2)+2))) & A_CHARTEXT); wattron(set_win,A_REVERSE); mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); - wattroff(set_win,A_REVERSE); + wattroff(set_win,A_REVERSE); wmove(set_win,(r+1),((c*2)+1)); wrefresh(set_win); - + k_ch = wgetch(set_win); - + switch(k_ch) { case K_LEFT: @@ -141,7 +141,7 @@ int selectc() break; case 'e': - case 'E': + case 'E': edit_mode(); dis_cmd(" Edit Character"); display(curchar); @@ -195,25 +195,25 @@ int selectc() case 'q': case 'Q': normal_set(r,c); - wrefresh(set_win); + wrefresh(set_win); return(1); break; - + case 'x': case 'X': normal_set(r,c); - wrefresh(set_win); + wrefresh(set_win); return(0); break; case 0x0c: wrefresh(curscr); break; - + default: beep(); break; - + } } } @@ -221,7 +221,7 @@ int selectc() void normal_set(int r, int c) { char h, l; - + h = ((mvwinch(set_win,(r+1),((c*2)+1))) & A_CHARTEXT); l = ((mvwinch(set_win,(r+1),((c*2)+2))) & A_CHARTEXT); wattroff(set_win,A_REVERSE); @@ -234,7 +234,7 @@ int sel_dest(void) int c, r; char h, l; unsigned int k_ch; - + c = (curchar / 16); r = (curchar % 16); @@ -242,19 +242,19 @@ int sel_dest(void) { curchar = r + (c*16); - + display(curchar); - + h = ((mvwinch(set_win,(r+1),((c*2)+1))) & A_CHARTEXT); l = ((mvwinch(set_win,(r+1),((c*2)+2))) & A_CHARTEXT); wattron(set_win,A_UNDERLINE); mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); - wattroff(set_win,A_UNDERLINE); + wattroff(set_win,A_UNDERLINE); wmove(set_win,(r+1),((c*2)+1)); wrefresh(set_win); k_ch = wgetch(set_win); - + switch(k_ch) { case K_LEFT: @@ -292,7 +292,7 @@ int sel_dest(void) c++; } break; - + case '\r': case '\n': normal_uset(r,c); @@ -301,9 +301,9 @@ int sel_dest(void) case 0x0c: wrefresh(curscr); break; - + default: - normal_uset(r,c); + normal_uset(r,c); return(-1); } } @@ -315,7 +315,7 @@ void normal_uset(int r, int c) h = ((mvwinch(set_win,(r+1),((c*2)+1))) & A_CHARTEXT); l = ((mvwinch(set_win,(r+1),((c*2)+2))) & A_CHARTEXT); - + wattroff(set_win,A_UNDERLINE); mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); wmove(set_win,(r+1),((c*2)+1)); @@ -324,9 +324,9 @@ void normal_uset(int r, int c) { wattron(set_win,A_REVERSE); mvwprintw(set_win,(r+1),((c*2)+1),"%c%c",h,l); - wattroff(set_win,A_REVERSE); + wattroff(set_win,A_REVERSE); wmove(set_win,(r+1),((c*2)+1)); - } + } } diff --git a/usr.sbin/pcvt/fontedit/fontedit.c b/usr.sbin/pcvt/fontedit/fontedit.c index 36a3232..d9ed357c 100644 --- a/usr.sbin/pcvt/fontedit/fontedit.c +++ b/usr.sbin/pcvt/fontedit/fontedit.c @@ -17,7 +17,7 @@ * * REVISION HISTORY: * - * Nov 21, 1987 - Fixed man page to say "Fontedit" instead of "Top" + * Nov 21, 1987 - Fixed man page to say "Fontedit" instead of "Top" * Nov 22, 1987 - Added BSD Compatible ioctl, turned cursor on/off * - eap@bucsf.bu.edu */ @@ -79,7 +79,7 @@ typedef enum { false, true } bool; #define ROW_OFFSET 3 #define COL_OFFSET 10 -/* +/* * Position of the DRCS table. */ @@ -122,8 +122,8 @@ interrupt() { void clear_screen(); #ifdef CURFIX - printf("%s\n",CURSORON); -#endif CURFIX + printf("%s\n",CURSORON); +#endif CURFIX #ifdef SYSV ioctl( 0, TCSETA, &old_stty ); #endif SYSV @@ -142,7 +142,7 @@ interrupt() * Main * Grab input/output file and call main command processor. */ - + main( argc, argv ) int argc; char *argv[]; @@ -168,7 +168,7 @@ char *argv[]; } } fclose( font_file ); - + if ( ( font_file = fopen( argv[1], "r" ) ) != (FILE *)0 ) { get_table( font_file ); fclose( font_file ); @@ -204,7 +204,7 @@ char *argv[]; ioctl( 0, TIOCSETA, &new_stty ); #endif /* __NetBSD__ || __FreeBSD__ */ #ifdef BSD - new_stty.sg_flags |= CBREAK; + new_stty.sg_flags |= CBREAK; new_stty.sg_flags &= ~ECHO; ioctl( 0, TIOCSETP, &new_stty ); #endif BSD @@ -237,7 +237,7 @@ char *argv[]; /* * Command - * Process a function key. + * Process a function key. * * The user cannot fill in slots 0 or 95 (space and del respecitively). */ @@ -317,7 +317,7 @@ command() } draw_current(); break; - + case KEY_REMOVE: /* Remove a row */ change = true; for ( j = 0; j < MAX_COLS; ++j ) { @@ -349,7 +349,7 @@ command() warning( "Changes not saved" ); error = true; override = true; - } else { + } else { extract_entry( current_entry ); draw_current(); } @@ -363,7 +363,7 @@ command() } else { print_entry( current_entry, false ); current_entry = current_entry - 1; - if ( current_entry == 0 ) + if ( current_entry == 0 ) current_entry = TOTAL_ENTRIES - 2; print_entry( current_entry, true ); } @@ -398,7 +398,7 @@ command() break; case KEY_LEFT: - if ( col == 0 ) + if ( col == 0 ) col = MAX_COLS; col = col - 1; break; @@ -522,7 +522,7 @@ init_restore() { register int row, col; register int i; - + void draw_current(), clear_screen(), print_entry(); clear_screen(); @@ -572,7 +572,7 @@ init_restore() printf( "|" ); move ( TABLE_ROW + i * 2 + 1, TABLE_COL +12 * 2 - 1); printf( "+" ); - } + } for ( i = 0; i < TOTAL_ENTRIES; ++i ) print_entry( i, (i == current_entry) ? true : false ); } @@ -618,7 +618,7 @@ draw_current() * highlight * Draw the cursor in the main display area. */ - + void highlight( row, col, on ) unsigned int row, col; @@ -654,7 +654,7 @@ bool on; /* * Clear_screen */ - + void clear_screen() { @@ -681,7 +681,7 @@ int y, x; * Convert the bit pattern used in the main display area into something * that the vt220 can digest - namely sixels... */ - + void build_entry( entry_no ) unsigned int entry_no; @@ -711,7 +711,7 @@ unsigned int entry_no; } font_table[entry_no][col+8] = mask + 077; } - + } @@ -733,7 +733,7 @@ unsigned int entry_no; /* Top set of sixels */ mask = font_table[entry_no][col]; - if ( mask >= 077 ) + if ( mask >= 077 ) mask -= 077; else mask = 0; /* Bogus entry */ @@ -756,7 +756,7 @@ unsigned int entry_no; mask = mask >> 1; } } - + } @@ -773,7 +773,7 @@ int entry_no; { register char *fp = font_table[entry_no]; - printf( "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\", + printf( "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\", entry_no, fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7], fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] ); @@ -830,8 +830,8 @@ FILE *font_file; for ( i = 0; i < TOTAL_ENTRIES; ++i ) { fp = font_table[i]; - fprintf( font_file, "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\\n", - i, + fprintf( font_file, "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\\n", + i, fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7], fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] ); } @@ -855,10 +855,10 @@ FILE *font_file; register int j; while( fgets( s, 255, font_file ) ) { - if ( strncmp( s, "\033P1;", 4 ) != 0 ) + if ( strncmp( s, "\033P1;", 4 ) != 0 ) continue; /* Bogus line */ p = &s[4]; - if ( sscanf( p, "%d", &i ) != 1 ) + if ( sscanf( p, "%d", &i ) != 1 ) continue; /* Illegal entry number */ if ( i <= 0 || TOTAL_ENTRIES <= i ) @@ -868,12 +868,12 @@ FILE *font_file; while ( *p && *p != '@' ) ++p; /* Skip to font definition */ - if ( ! *p++ ) + if ( ! *p++ ) continue; /* Skip @ */ for ( j = 0; *p && *p != '\033' && j < 16; ++j, ++p ) { if ( *p == '/' ) { - j = 8; + j = 8; ++p; } fp[j] = *p; @@ -888,7 +888,7 @@ FILE *font_file; * Help * Print out help information. */ - + void help() { diff --git a/usr.sbin/pcvt/ispcvt/ispcvt.c b/usr.sbin/pcvt/ispcvt/ispcvt.c index fe6a1a9..3e86b90 100644 --- a/usr.sbin/pcvt/ispcvt/ispcvt.c +++ b/usr.sbin/pcvt/ispcvt/ispcvt.c @@ -67,11 +67,11 @@ char *argv[]; extern char *optarg; struct pcvtid pcvtid; - struct pcvtinfo pcvtinfo; + struct pcvtinfo pcvtinfo; int c; char *p; int verbose = 0; - int config = 0; + int config = 0; int dflag = 0; int fd; char *device; @@ -83,16 +83,16 @@ char *argv[]; case 'v': verbose = 1; break; - + case 'c': config = 1; break; - + case 'd': device = optarg; dflag = 1; break; - + case '?': default: usage(); @@ -173,17 +173,17 @@ char *argv[]; case CONF_NETBSD: p = "PCVT_NETBSD"; break; - + case CONF_FREEBSD: p = "PCVT_FREEBSD"; break; - + default: case CONF_UNKNOWNOPSYS: p = "UNKNOWN"; break; - - } + + } fprintf(stderr,"Operating System = %s\t", p); fprintf(stderr,"OS Release Id = %u\n", pcvtinfo.opsysrel); fprintf(stderr,"PCVT_NSCREENS = %u\t\t", pcvtinfo.nscreens); @@ -192,7 +192,7 @@ char *argv[]; fprintf(stderr,"PCVT_SYSBEEPF = %u\n", pcvtinfo.sysbeepf); fprintf(stderr,"PCVT_PCBURST = %u\t\t", pcvtinfo.pcburst); fprintf(stderr,"PCVT_KBD_FIFO_SZ = %u\n\n", pcvtinfo.kbd_fifo_sz); - + /* config booleans */ fprintf(stderr,"PCVT_132GENERIC = %s", diff --git a/usr.sbin/pcvt/kcon/kcon.c b/usr.sbin/pcvt/kcon/kcon.c index 8393e86..259af90 100644 --- a/usr.sbin/pcvt/kcon/kcon.c +++ b/usr.sbin/pcvt/kcon/kcon.c @@ -54,7 +54,7 @@ static char *id = * -hm remapping debugging * -hm garbage output for remapped keys bugfix * -hm patch from Lon Willet, adding -R - * + * *---------------------------------------------------------------------------*/ #include <stdio.h> @@ -89,12 +89,12 @@ char *argv[]; int c = 0; int errf = 0; - + int rate = -1; int delay = -1; char *map; int kbfd; - + while((c = getopt(argc, argv, "Rd:lm:opr:st:x")) != EOF) { switch(c) @@ -123,11 +123,11 @@ char *argv[]; else of = 1; break; - + case 'p': pf = 1; break; - + case 'r': rf = 1; rate = atoi(optarg); @@ -136,7 +136,7 @@ char *argv[]; case 's': sf = 1; break; - + case 't': if(*optarg == '+') tf = 1; @@ -152,7 +152,7 @@ char *argv[]; else xf = 1; break; - + default: usage(); } @@ -175,7 +175,7 @@ char *argv[]; showtypeamatic(kbfd); exit(0); } - + if(lf) { listcurrent(kbfd); @@ -194,7 +194,7 @@ char *argv[]; { setrepeat(kbfd, tf); } - + if(df || rf) { if(delay > 3) @@ -217,12 +217,12 @@ char *argv[]; close(kbfd); exit(0); -} +} /*---------------------------------------------------------------------------* * display usage info & exit *---------------------------------------------------------------------------*/ -usage() +usage() { fprintf(stderr, "\nkcon: keyboard control and remapping utility for pcvt video driver\n"); fprintf(stderr, "usage: [-R] [-d delay] [-l] [-m map] [-o] [-p] [-r rate] [-t +/-] [-x]\n"); @@ -231,10 +231,10 @@ usage() fprintf(stderr, " -l produce listing of current keyboard mapping\n"); fprintf(stderr, " -m set keyboard remapping from a keycap entry\n"); fprintf(stderr, " -o set octal output for listing\n"); - fprintf(stderr, " -p pure, don't display escape as 'ESC' for listing\n"); + fprintf(stderr, " -p pure, don't display escape as 'ESC' for listing\n"); fprintf(stderr, " -r chars/second repeat value (range: 0...31 => 30...2 chars/sec)\n"); fprintf(stderr, " -s show, display the current keyboard typematic values\n"); - fprintf(stderr, " -t switch repeat on(+) or off(-)\n"); + fprintf(stderr, " -t switch repeat on(+) or off(-)\n"); fprintf(stderr, " -x set hexadecimal output for listing\n\n"); exit(1); } @@ -248,7 +248,7 @@ u_char *s; static char res_str[80]; static char conv_buf[80]; int i; - + res_str[0] = '\0'; for(i = 0; s[i]; i++) @@ -302,14 +302,14 @@ int kbfd; struct kbd_ovlkey keyboardmap[KBDMAXKEYS]; struct kbd_ovlkey *kbmapp; int keytype; - int altgr_defined; + int altgr_defined; int i; altgr_defined = 0; kbmapp = keyboardmap; for (i = 0; i < KBDMAXKEYS; i++) - { + { kbmapp->keynum = i; if(ioctl(kbfd, KBDGCKEY, kbmapp) < 0) @@ -336,11 +336,11 @@ int kbfd; } kbmapp = &keyboardmap[1]; - + for(i = 1; i < KBDMAXKEYS; i++) { keytype = kbmapp->type; - + if(keytype) { if(keytype & KBD_OVERLOAD) @@ -357,22 +357,22 @@ int kbfd; case KBD_KP: case KBD_CURSOR: case KBD_RETURN: /* ??? */ - + if(kbmapp->subu == KBD_SUBT_STR) printf("%-15s ",showcntrl(kbmapp->unshift)); else printf("Function() "); - + if(kbmapp->subs == KBD_SUBT_STR) printf("%-15s ",showcntrl(kbmapp->shift)); else printf("Function() "); - + if(kbmapp->subc == KBD_SUBT_STR) printf("%-15s ",showcntrl(kbmapp->ctrl)); else printf("Function() "); - + if(altgr_defined) { if(kbmapp->suba == KBD_SUBT_STR) @@ -381,13 +381,13 @@ int kbfd; printf("Function() "); } break; - } + } putchar('\n'); } kbmapp++; } -} - +} + /*---------------------------------------------------------------------------* * show delay and rate values for keyboard *---------------------------------------------------------------------------*/ @@ -438,7 +438,7 @@ int kbfd; int cur_typemat_val; int delay, rate; - + if((ioctl(kbfd, KBDGTPMAT, &cur_typemat_val)) < 0) { perror("kcon: ioctl KBDGTPMAT failed"); @@ -461,7 +461,7 @@ int kbfd; int tf; { int srepsw_val; - + if(tf == 1) srepsw_val = KBD_REPEATON; else @@ -473,7 +473,7 @@ int tf; exit(1); } } - + /*---------------------------------------------------------------------------* * set delay and rate values for keyboard *---------------------------------------------------------------------------*/ @@ -495,7 +495,7 @@ int rate; delay = (cur_typemat_val & 0x60); else delay = ((delay << 5) & 0x60); - + if(rate == -1) rate = (cur_typemat_val & 0x1f); else @@ -521,7 +521,7 @@ char *map; int ret; char keyflag[128]; int i; - + /* try to find the entry */ ret = kgetent(cap_entry, map); @@ -544,7 +544,7 @@ char *map; perror("kcon: ioctl KBDDEFAULT failed"); exit(1); } - + /* DE flag present? */ if(kgetflag("de")) @@ -582,15 +582,15 @@ int kbfd; "sc", KBD_SCROLL }; - + for(i = 0; i < 4; i++) { int n; - + sprintf(cap, "%s", lock[i].ch); - + n = kgetnum(cap); - + if(n > 0) { if (keyflag[n]) @@ -622,7 +622,7 @@ int kbfd; int i, j; char cap[16]; struct kbd_ovlkey entry; - + struct { char ch; u_short typ; @@ -639,7 +639,7 @@ int kbfd; for(j = 1; j < 10; j++) { int n; - + sprintf(cap, "%c%d", shift[i].ch,j); n = kgetnum(cap); @@ -655,7 +655,7 @@ int kbfd; entry.keynum = n; entry.type = shift[i].typ; - if((ioctl(kbfd, KBDSCKEY, &entry)) < 0) + if((ioctl(kbfd, KBDSCKEY, &entry)) < 0) { perror("kcon: ioctl KBDSCKEY failed"); exit(1); @@ -678,7 +678,7 @@ int kbfd; char *addr_str; char *new_str; struct kbd_ovlkey entry; - + struct { char *addr; char ch; @@ -688,8 +688,8 @@ int kbfd; &entry.shift[0], 'S', &entry.ctrl[0], 'C', &entry.altgr[0], 'A' - }; - + }; + for(i = 1; i < KBDMAXKEYS; i++) { setflag = 0; @@ -707,10 +707,10 @@ int kbfd; for(j = 0; j < 5; j++) { sprintf(cap, "%c%d", standard[j].ch,i); - + if((j == 0) && (kgetflag(cap))) { - /* delete a key */ + /* delete a key */ entry.type = KBD_NONE; setflag = 1; @@ -718,7 +718,7 @@ int kbfd; } else - { + { addr_str = standard[j].addr; if(new_str = kgetstr(cap, &addr_str)) { @@ -731,7 +731,7 @@ int kbfd; } } } - + setit: if (setflag) { if (keyflag[i]) diff --git a/usr.sbin/pcvt/keycap/keycap.c b/usr.sbin/pcvt/keycap/keycap.c index f70e987..9bbb7e5 100644 --- a/usr.sbin/pcvt/keycap/keycap.c +++ b/usr.sbin/pcvt/keycap/keycap.c @@ -91,7 +91,7 @@ char *id,*cstr; register char *c = cstr+n; if (strncmp(id,cstr,n)==0 && - (*c==':' || *c=='|' || *c=='=' || *c=='#') || *c=='@') + (*c==':' || *c=='|' || *c=='=' || *c=='#') || *c=='@') return c; return 0; } @@ -258,7 +258,7 @@ char *id; bp = kskip(bp); if (*bp == 0) return (-1); - if ((xp=nmatch(id,bp)) == 0) + if ((xp=nmatch(id,bp)) == 0) continue; bp = xp; /* we have an entry */ if (*bp == '@') diff --git a/usr.sbin/pcvt/loadfont/loadfont.c b/usr.sbin/pcvt/loadfont/loadfont.c index db25185..bbf293f 100644 --- a/usr.sbin/pcvt/loadfont/loadfont.c +++ b/usr.sbin/pcvt/loadfont/loadfont.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis * - * Copyright (c) 1992, 1994 Brian Dunford-Shore + * Copyright (c) 1992, 1994 Brian Dunford-Shore * * All rights reserved. * @@ -45,7 +45,7 @@ static char *id = * -hm add -d option * *---------------------------------------------------------------------------*/ - + #include <stdio.h> #include <fcntl.h> #include <sys/types.h> @@ -96,7 +96,7 @@ char *argv[]; int info = -1; int dflag = 0; char *device; - + while( (c = getopt(argc, argv, "c:d:f:i")) != EOF) { switch(c) @@ -104,7 +104,7 @@ char *argv[]; case 'c': chr_set = atoi(optarg); break; - + case 'd': device = optarg; dflag = 1; @@ -114,18 +114,18 @@ char *argv[]; filename = optarg; fflag = 1; break; - + case 'i': info = 1; break; - + case '?': default: usage(); break; } } - + if(chr_set == -1 || fflag == -1) info = 1; @@ -148,7 +148,7 @@ char *argv[]; if(info == 1) { int i; - + if(ioctl(fd, VGAGETSCREEN, &screeninfo) == -1) { perror("ioctl VGAGETSCREEN failed"); @@ -170,7 +170,7 @@ char *argv[]; } break; case VGA_ADAPTOR: - printheader(); + printheader(); for(i = 0;i < 8;i++) { printvgafontattr(i); @@ -184,7 +184,7 @@ char *argv[]; usage(); sbp = &sbuf; - + if((in = fopen(filename, "r")) == NULL) { char buffer[80]; @@ -200,7 +200,7 @@ char *argv[]; perror(buffer); exit(1); } - + switch(sbp->st_size) { case FONT8X8: @@ -208,29 +208,29 @@ char *argv[]; scr_scan = SSCAN8X8; scr_rows = SIZ_50ROWS; break; - + case FONT8X10: chr_height = HEIGHT8X10; scr_scan = SSCAN8X10; scr_rows = SIZ_40ROWS; break; - + case FONT8X14: chr_height = HEIGHT8X14; scr_scan = SSCAN8X14; scr_rows = SIZ_28ROWS; break; - + case FONT8X16: chr_height = HEIGHT8X16; scr_scan = SSCAN8X16; scr_rows = SIZ_25ROWS; break; - + default: fprintf(stderr,"error, file %s is no valid font file, size=%d\n",argv[1],sbp->st_size); exit(1); - } + } if((fonttab = (unsigned char *)malloc((size_t)sbp->st_size)) == NULL) { @@ -242,7 +242,7 @@ char *argv[]; { fprintf(stderr,"error reading file %s, size = %d, read = is no valid font file, size=%d\n",argv[1],sbp->st_size, ret); exit(1); - } + } loadfont(chr_set, chr_height, fonttab); setfont(chr_set, 1, chr_height - 1, scr_scan, scr_rows); @@ -300,7 +300,7 @@ int charset; { struct vgafontattr vfattr; static int sizetab[] = { 25, 28, 35, 40, 43, 50 }; - + vfattr.character_set = charset; if(ioctl(fd, VGAGETFONTATTR, &vfattr) == -1) @@ -338,7 +338,7 @@ usage() fprintf(stderr,"\nloadfont - load font into ega/vga font ram for pcvt video driver\n"); fprintf(stderr,"usage: loadfont -c <cset> -d <dev> -f <name> -i\n"); fprintf(stderr," -c <cset> characterset to load (ega 0..3, vga 0..7)\n"); - fprintf(stderr," -d <dev> specify device\n"); + fprintf(stderr," -d <dev> specify device\n"); fprintf(stderr," -f <name> filename containing binary font data\n"); fprintf(stderr," -i print status and types of loaded fonts (default)\n"); exit(1); diff --git a/usr.sbin/pcvt/mcon/mcon.c b/usr.sbin/pcvt/mcon/mcon.c index 89989d9..dac70d7 100644 --- a/usr.sbin/pcvt/mcon/mcon.c +++ b/usr.sbin/pcvt/mcon/mcon.c @@ -95,19 +95,19 @@ int main(int argc, char **argv) { do_set = 1; if(left == -1) goto keynameerr; break; - + case 'm': mid = nametoscan(optarg); do_set = 1; if(mid == -1) goto keynameerr; break; - + case 'r': right = nametoscan(optarg); do_set = 1; if(right == -1) goto keynameerr; break; - + keynameerr: { fprintf(stderr, "unknown key name: %s\n", @@ -115,12 +115,12 @@ int main(int argc, char **argv) { errs++; } break; - + case 'a': accel = 1000 * strtol(optarg, 0, 10); do_set = 1; break; - + case 's': if(strcmp(optarg, "0") == 0 || strcmp(optarg, "false") == 0 @@ -137,21 +137,21 @@ int main(int argc, char **argv) { } do_set = 1; break; - + default: errs++; } - + argc -= optind; argv += optind; - + if(errs || argc != 1) { fprintf(stderr, "usage: " "mouse [-l key][-m key][-r key][-a acctime][-s 0|1] " "mousedev\n"); return 2; } - + if((fd = open(argv[0], O_RDONLY)) < 0) { perror("open(mousedev)"); return 2; @@ -182,7 +182,7 @@ int main(int argc, char **argv) { if(accel) mdef.acceltime = accel; if(sticky != -1) mdef.stickybuttons = sticky; - + if(ioctl(fd, KBDMOUSESET, &mdef) < 0) { perror("ioctl(KBDMOUSESET)"); return 1; diff --git a/usr.sbin/pcvt/scon/scon.c b/usr.sbin/pcvt/scon/scon.c index 5237d07..0cb053b 100644 --- a/usr.sbin/pcvt/scon/scon.c +++ b/usr.sbin/pcvt/scon/scon.c @@ -192,10 +192,10 @@ char *argv[]; extern int optind; extern int opterr; extern char *optarg; - + int c; int fd; - + while( (c = getopt(argc, argv, "ac:d:f:HVlms:t:vp:18")) != EOF) { switch(c) @@ -203,7 +203,7 @@ char *argv[]; case 'a': aflag = 1; break; - + case 'l': lflag = 1; break; @@ -215,17 +215,17 @@ char *argv[]; case 'c': current = atoi(optarg); break; - + case 'd': device = optarg; dflag = 1; break; - + case 'f': onoff = optarg; fflag = 1; break; - + case 'V': pflag = 1; break; @@ -309,7 +309,7 @@ char *argv[]; case '1': colms = 132; break; - + case '8': colms = 80; break; @@ -348,7 +348,7 @@ char *argv[]; exit(1); } if(vflag) - printf("using device %s\n",device); + printf("using device %s\n",device); } if(aflag == 1) /* return adaptor type */ @@ -404,7 +404,7 @@ char *argv[]; } goto success; } - + if(Pflag == 3) { /* listing VGA palette */ @@ -445,14 +445,14 @@ char *argv[]; screeninfo.screen_no = -1; /* We are using fd */ screeninfo.current_screen = current; screeninfo.pure_vt_mode = -1; - screeninfo.screen_size = res; + screeninfo.screen_size = res; screeninfo.force_24lines = -1; - + if(current != -1) /* set current screen */ { if(vflag) printf("processing option -c, setting current screen to %d\n",current); - + if(ioctl(1, VGASETSCREEN, &screeninfo) == -1) { perror("ioctl VGASETSCREEN failed"); @@ -523,8 +523,8 @@ char *argv[]; success: if(vflag) printf("successful execution of ioctl VGASETSCREEN!\n"); - exit(0); -} + exit(0); +} usage() { @@ -566,19 +566,19 @@ int fd; case UNKNOWN_ADAPTOR: printf("UNKNOWN\n"); break; - + case MDA_ADAPTOR: printf("MDA\n"); break; - + case CGA_ADAPTOR: printf("CGA\n"); break; - + case EGA_ADAPTOR: printf("EGA\n"); break; - + case VGA_ADAPTOR: printf("VGA\n"); break; @@ -598,11 +598,11 @@ int fd; default: printf("UNKNOWN\n"); break; - + case MONITOR_MONO: printf("MONO\n"); break; - + case MONITOR_COLOR: printf("COLOR\n"); break; @@ -675,26 +675,26 @@ int fd; } printf( "\nVideo Adaptor Type = "); - + switch(screeninfo.adaptor_type) { default: case UNKNOWN_ADAPTOR: printf("UNKNOWN Video Adaptor\n"); break; - + case MDA_ADAPTOR: printf("MDA - Monochrome Display Adaptor\n"); break; - + case CGA_ADAPTOR: printf("CGA - Color Graphics Adaptor\n"); break; - + case EGA_ADAPTOR: printf("EGA - Enhanced Graphics Adaptor\n"); break; - + case VGA_ADAPTOR: printf("VGA - Video Graphics Adaptor/Array\n"); printf(" VGA Chipset Manufacturer = %s\n", @@ -706,61 +706,61 @@ int fd; break; } - printf( "Display Monitor Type = "); + printf( "Display Monitor Type = "); switch(screeninfo.monitor_type) { default: printf("UNKNOWN Monitor Type\n"); break; - + case MONITOR_MONO: printf("Monochrome Monitor\n"); break; - + case MONITOR_COLOR: printf("Color Monitor\n"); break; } - + printf( "Number of Downloadable Fonts = %d\n",screeninfo.totalfonts); printf( "Number of Virtual Screens = %d\n",screeninfo.totalscreens); printf( "Info Request Screen Number = %d\n",screeninfo.screen_no); printf( "Current Displayed Screen = %d\n",screeninfo.current_screen); - - if(screeninfo.pure_vt_mode == M_PUREVT) + + if(screeninfo.pure_vt_mode == M_PUREVT) printf( "Terminal Emulation Mode = VT220\n"); else printf( "Terminal Emulation Mode = VT220 with HP Features\n"); - printf( "Lines = "); + printf( "Lines = "); switch(screeninfo.screen_size) { case SIZ_25ROWS: printf( "25\n"); break; - + case SIZ_28ROWS: printf( "28\n"); break; - + case SIZ_35ROWS: printf( "35\n"); break; - + case SIZ_40ROWS: printf( "40\n"); break; - + case SIZ_43ROWS: printf( "43\n"); break; - + case SIZ_50ROWS: printf( "50\n"); break; - + default: printf( "UNKNOWN\n"); break; diff --git a/usr.sbin/pcvt/set2061/ICD2061Aalt.c b/usr.sbin/pcvt/set2061/ICD2061Aalt.c index 248476a..a74ec4e 100644 --- a/usr.sbin/pcvt/set2061/ICD2061Aalt.c +++ b/usr.sbin/pcvt/set2061/ICD2061Aalt.c @@ -24,7 +24,7 @@ unsigned short card; unsigned short crtcaddr; unsigned short clockreg; -static double range[15] = {50.0, 51.0, 53.2, 58.5, 60.7, 64.4, 66.8, 73.5, +static double range[15] = {50.0, 51.0, 53.2, 58.5, 60.7, 64.4, 66.8, 73.5, 75.6, 80.9, 83.2, 91.5, 100.0, 120.0, 120.0}; #ifdef __STDC__ @@ -216,7 +216,7 @@ static void init_clock(setup, crtcport) int i; unsigned char c; -#ifndef PCVT_STANDALONE +#ifndef PCVT_STANDALONE (void)xf86DisableInterrupts(); #endif diff --git a/usr.sbin/pcvt/set2061/Makefile b/usr.sbin/pcvt/set2061/Makefile index db71830..0cbeff7 100644 --- a/usr.sbin/pcvt/set2061/Makefile +++ b/usr.sbin/pcvt/set2061/Makefile @@ -10,4 +10,4 @@ install: ${DEMOS} .include <bsd.prog.mk> -$(PROG): compiler.h +$(PROG): compiler.h diff --git a/usr.sbin/pcvt/set2061/compiler.h b/usr.sbin/pcvt/set2061/compiler.h index 3a0e99a..9fbdb56 100644 --- a/usr.sbin/pcvt/set2061/compiler.h +++ b/usr.sbin/pcvt/set2061/compiler.h @@ -20,7 +20,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. * - * $Header: /proj/X11/mit/server/ddx/x386/RCS/compiler.h,v 1.2 1991/06/27 00:01:11 root Exp $ + * $Header: /home/ncvs/src/usr.sbin/pcvt/set2061/compiler.h,v 1.1.1.1 1995/02/05 13:49:25 jkh Exp $ */ @@ -221,7 +221,7 @@ inw(port) /* * rdinx - read the indexed byte port 'port', index 'ind', and return its value */ -static __inline__ unsigned char +static __inline__ unsigned char #ifdef __STDC__ rdinx(unsigned short port, unsigned char ind) #else @@ -239,7 +239,7 @@ unsigned char ind; /* * wrinx - write 'val' to port 'port', index 'ind' */ -static __inline__ void +static __inline__ void #ifdef __STDC__ wrinx(unsigned short port, unsigned char ind, unsigned char val) #else @@ -258,7 +258,7 @@ unsigned char ind, val; */ static __inline__ void #ifdef __STDC__ -modinx(unsigned short port, unsigned char ind, +modinx(unsigned short port, unsigned char ind, unsigned char mask, unsigned char new) #else modinx(port, ind, mask, new) @@ -322,7 +322,7 @@ unsigned char ind, mask; } /* - * testinx - returns true iff all bits of register 'port', index 'ind' are + * testinx - returns true iff all bits of register 'port', index 'ind' are * readable & writable. */ static __inline__ int diff --git a/usr.sbin/pcvt/set2061/main.c b/usr.sbin/pcvt/set2061/main.c index 03a482d..e16b1df 100644 --- a/usr.sbin/pcvt/set2061/main.c +++ b/usr.sbin/pcvt/set2061/main.c @@ -41,7 +41,7 @@ static char *id = * -hm start using 132 columns on my Elsa Winner * *---------------------------------------------------------------------------*/ - + #include <stdio.h> #include <fcntl.h> #include <machine/pcvt_ioctl.h> @@ -62,7 +62,7 @@ char *argv[]; int c; long freq = -1; int no = -1; - + while( (c = getopt(argc, argv, "f:n:")) != EOF) { switch(c) @@ -70,11 +70,11 @@ char *argv[]; case 'f': freq = atoi(optarg); break; - + case 'n': no = atoi(optarg); break; - + case '?': default: usage(); @@ -82,7 +82,7 @@ char *argv[]; } } - if(freq == -1 || no == -1) + if(freq == -1 || no == -1) usage(); if((fd = open("/dev/console", O_RDONLY)) < 0) diff --git a/usr.sbin/pcvt/userkeys/vt220keys.c b/usr.sbin/pcvt/userkeys/vt220keys.c index dfde51a..e5a54b5 100644 --- a/usr.sbin/pcvt/userkeys/vt220keys.c +++ b/usr.sbin/pcvt/userkeys/vt220keys.c @@ -7,23 +7,23 @@ * strings. * * Author, Author: Barry Shein, Boston University - * + * * HISTORY {1} 30-Oct-85 Kenneth J. Lester (ken) at ektools Added the necessary code to read an initialization file. This should make it easier to used this program. Also added code that will set-up the terminal in vt200 (this saves the user the - trouble of checking if the set-up is in vt200). - + trouble of checking if the set-up is in vt200). + Restructed the main function to use getopt, for argument - processing. - + processing. + Alterated usage function to include new "i" option (init file) - + -hm minor modifications for pcvt 2.0 release - + */ #include <stdio.h> @@ -69,8 +69,8 @@ struct keynames { char prog[BUFSIZ]; -main(argc,argv) - int argc; +main(argc,argv) + int argc; char *argv[]; { /* these are defined in the getopt routine */ @@ -89,7 +89,7 @@ main(argc,argv) /* get options */ while ((option = getopt(argc, argv, "cli")) != EOF) - switch(option) + switch(option) { case 'c' : clearf++; @@ -110,14 +110,14 @@ main(argc,argv) printf("\033[62;2\"p"); /* vt200 8 bits */ if(clearf) clearkeys(); - + if (initf) getinit(); /* process {key, key string} pairs. Note optind is index to argv for first pair. By adding 1 to optind insures that a pair exists i.e. the last key has a key string. */ - while(optind + 1 < argc) + while(optind + 1 < argc) { dokey(argv[optind], argv[optind+1]); optind += 2; @@ -205,8 +205,8 @@ usage() <ws> keyname ws string Where ws is white space (spaces or tabs) and <ws> is optional white space. - The string may include spaces or tabs and need not be quoted. If the - string has the sequence of "\n" then a newline character is included in + The string may include spaces or tabs and need not be quoted. If the + string has the sequence of "\n" then a newline character is included in the string. examples: @@ -289,7 +289,7 @@ getinit() dokey(key, keystr); /* load key with string */ } } - else + else { fprintf(stderr, "init file %s not found\n\n", path); usage(); diff --git a/usr.sbin/pcvt/vttest/esc.c b/usr.sbin/pcvt/vttest/esc.c index 520946b..b2bce92 100644 --- a/usr.sbin/pcvt/vttest/esc.c +++ b/usr.sbin/pcvt/vttest/esc.c @@ -256,7 +256,7 @@ ttybin(bin) int bin; { static int arglst[] = { _IOPIM, `TTY`, - 0 + 0 }; arglst[0] = bin ? _IOPIM : _IOASC; v = uuo(OPEN, 1, &arglst[0]); diff --git a/usr.sbin/pcvt/vttest/main.c b/usr.sbin/pcvt/vttest/main.c index cb67f74..02cbc62 100644 --- a/usr.sbin/pcvt/vttest/main.c +++ b/usr.sbin/pcvt/vttest/main.c @@ -558,7 +558,7 @@ tst_keyboard() { - DECKPNM (Keypad Numeric Mode) The standard VT100 keayboard layout: - + UP DN LE RI ESC 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ `~ BS @@ -1321,7 +1321,7 @@ tst_vt52() { for (i = 2; i <= 23; i++) { vt52cup(i,70); printf("%s", "**Foobar"); } - vt52cup(23,10); + vt52cup(23,10); for (i = 23; i >= 2; i--) { printf("%s", "*"); printf("%c", 8); /* BS */ |