From 20029082339135e76316a0c57f443d60c64313ab Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Tue, 5 Aug 1986 08:25:05 -0800 Subject: [PATCH] lint SCCS-vsn: usr.bin/window/wwopen.c 3.23 SCCS-vsn: usr.bin/window/wwtty.c 3.10 SCCS-vsn: usr.bin/window/ttinit.c 3.16 SCCS-vsn: usr.bin/window/wwpty.c 3.12 SCCS-vsn: usr.bin/window/wwenviron.c 3.15 SCCS-vsn: usr.bin/window/win.c 3.16 SCCS-vsn: usr.bin/window/wwsize.c 3.4 --- usr/src/usr.bin/window/ttinit.c | 4 ++-- usr/src/usr.bin/window/win.c | 6 +++--- usr/src/usr.bin/window/wwenviron.c | 6 +++--- usr/src/usr.bin/window/wwopen.c | 4 ++-- usr/src/usr.bin/window/wwpty.c | 4 ++-- usr/src/usr.bin/window/wwsize.c | 4 ++-- usr/src/usr.bin/window/wwtty.c | 22 +++++++++++----------- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/usr/src/usr.bin/window/ttinit.c b/usr/src/usr.bin/window/ttinit.c index 1cc62bf89e..c419abe388 100644 --- a/usr/src/usr.bin/window/ttinit.c +++ b/usr/src/usr.bin/window/ttinit.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)ttinit.c 3.15 %G%"; +static char sccsid[] = "@(#)ttinit.c 3.16 %G%"; #endif /* @@ -69,7 +69,7 @@ ttinit() wwerrno = WWE_CANTDO; return -1; } - if (ioctl(0, (int)TIOCGWINSZ, (char *)&winsize) >= 0 && + if (ioctl(0, TIOCGWINSZ, (char *)&winsize) >= 0 && winsize.ws_row != 0 && winsize.ws_col != 0) { tt.tt_nrow = winsize.ws_row; tt.tt_ncol = winsize.ws_col; diff --git a/usr/src/usr.bin/window/win.c b/usr/src/usr.bin/window/win.c index 7e76a2528c..ad3443334e 100644 --- a/usr/src/usr.bin/window/win.c +++ b/usr/src/usr.bin/window/win.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)win.c 3.15 %G%"; +static char sccsid[] = "@(#)win.c 3.16 %G%"; #endif /* @@ -233,7 +233,7 @@ stopwin(w) { w->ww_stopped = 1; if (w->ww_pty >= 0 && w->ww_ispty) - (void) ioctl(w->ww_pty, (int)TIOCSTOP, (char *)0); + (void) ioctl(w->ww_pty, TIOCSTOP, (char *)0); } startwin(w) @@ -241,7 +241,7 @@ startwin(w) { w->ww_stopped = 0; if (w->ww_pty >= 0 && w->ww_ispty) - (void) ioctl(w->ww_pty, (int)TIOCSTART, (char *)0); + (void) ioctl(w->ww_pty, TIOCSTART, (char *)0); } sizewin(w, nrow, ncol) diff --git a/usr/src/usr.bin/window/wwenviron.c b/usr/src/usr.bin/window/wwenviron.c index e5c7c13a21..7270c1868e 100644 --- a/usr/src/usr.bin/window/wwenviron.c +++ b/usr/src/usr.bin/window/wwenviron.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)wwenviron.c 3.14 %G%"; +static char sccsid[] = "@(#)wwenviron.c 3.15 %G%"; #endif /* @@ -22,7 +22,7 @@ register struct ww *wp; if ((i = open("/dev/tty", 0)) < 0) goto bad; - if (ioctl(i, (int)TIOCNOTTY, (char *)0) < 0) + if (ioctl(i, TIOCNOTTY, (char *)0) < 0) goto bad; (void) close(i); if ((i = wp->ww_socket) < 0 && (i = open(wp->ww_ttyname, 2)) < 0) @@ -32,7 +32,7 @@ register struct ww *wp; (void) dup2(i, 2); for (i = wwdtablesize - 1; i > 2; i--) (void) close(i); - (void) ioctl(0, (int)TIOCSPGRP, (char *)&pgrp); + (void) ioctl(0, TIOCSPGRP, (char *)&pgrp); (void) setpgrp(pgrp, pgrp); (void) signal(SIGPIPE, SIG_DFL); (void) sprintf(wwwintermcap, "TERMCAP=%sco#%d:li#%d:%s%s%s%s%s%s%s", diff --git a/usr/src/usr.bin/window/wwopen.c b/usr/src/usr.bin/window/wwopen.c index 7487e4235c..88d2013eac 100644 --- a/usr/src/usr.bin/window/wwopen.c +++ b/usr/src/usr.bin/window/wwopen.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)wwopen.c 3.22 %G%"; +static char sccsid[] = "@(#)wwopen.c 3.23 %G%"; #endif /* @@ -73,7 +73,7 @@ wwopen(flags, nrow, ncol, row, col, nline) winsize.ws_row = nrow; winsize.ws_col = ncol; winsize.ws_xpixel = winsize.ws_ypixel = 0; - if (ioctl(w->ww_pty, (int)TIOCSWINSZ, (char *)&winsize) < 0) { + if (ioctl(w->ww_pty, TIOCSWINSZ, (char *)&winsize) < 0) { wwerrno = WWE_SYS; goto bad; } diff --git a/usr/src/usr.bin/window/wwpty.c b/usr/src/usr.bin/window/wwpty.c index 0919d528e8..f3e931cf46 100644 --- a/usr/src/usr.bin/window/wwpty.c +++ b/usr/src/usr.bin/window/wwpty.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)wwpty.c 3.11 %G%"; +static char sccsid[] = "@(#)wwpty.c 3.12 %G%"; #endif /* @@ -50,7 +50,7 @@ register struct ww *w; continue; } (void) close(tty); - if (ioctl(w->ww_pty, (int)TIOCPKT, (char *)&on) < 0) { + if (ioctl(w->ww_pty, TIOCPKT, (char *)&on) < 0) { (void) close(w->ww_pty); continue; } diff --git a/usr/src/usr.bin/window/wwsize.c b/usr/src/usr.bin/window/wwsize.c index 92bf35cb96..5151eddce5 100644 --- a/usr/src/usr.bin/window/wwsize.c +++ b/usr/src/usr.bin/window/wwsize.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)wwsize.c 3.3 %G%"; +static char sccsid[] = "@(#)wwsize.c 3.4 %G%"; #endif /* @@ -151,7 +151,7 @@ register struct ww *w; winsize.ws_row = nrow; winsize.ws_col = ncol; winsize.ws_xpixel = winsize.ws_ypixel = 0; - (void) ioctl(w->ww_pty, (int)TIOCSWINSZ, (char *)&winsize); + (void) ioctl(w->ww_pty, TIOCSWINSZ, (char *)&winsize); } return 0; bad: diff --git a/usr/src/usr.bin/window/wwtty.c b/usr/src/usr.bin/window/wwtty.c index ec796d92c5..125b1fbd68 100644 --- a/usr/src/usr.bin/window/wwtty.c +++ b/usr/src/usr.bin/window/wwtty.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)wwtty.c 3.9 %G%"; +static char sccsid[] = "@(#)wwtty.c 3.10 %G%"; #endif /* @@ -14,15 +14,15 @@ static char sccsid[] = "@(#)wwtty.c 3.9 %G%"; wwgettty(d, t) register struct ww_tty *t; { - if (ioctl(d, (int)TIOCGETP, (char *)&t->ww_sgttyb) < 0) + if (ioctl(d, TIOCGETP, (char *)&t->ww_sgttyb) < 0) goto bad; - if (ioctl(d, (int)TIOCGETC, (char *)&t->ww_tchars) < 0) + if (ioctl(d, TIOCGETC, (char *)&t->ww_tchars) < 0) goto bad; - if (ioctl(d, (int)TIOCGLTC, (char *)&t->ww_ltchars) < 0) + if (ioctl(d, TIOCGLTC, (char *)&t->ww_ltchars) < 0) goto bad; - if (ioctl(d, (int)TIOCLGET, (char *)&t->ww_lmode) < 0) + if (ioctl(d, TIOCLGET, (char *)&t->ww_lmode) < 0) goto bad; - if (ioctl(d, (int)TIOCGETD, (char *)&t->ww_ldisc) < 0) + if (ioctl(d, TIOCGETD, (char *)&t->ww_ldisc) < 0) goto bad; if ((t->ww_fflags = fcntl(d, F_GETFL, 0)) < 0) goto bad; @@ -40,16 +40,16 @@ bad: wwsettty(d, t, o) register struct ww_tty *t, *o; { - if (ioctl(d, (int)TIOCSETN, (char *)&t->ww_sgttyb) < 0) + if (ioctl(d, TIOCSETN, (char *)&t->ww_sgttyb) < 0) goto bad; - if (ioctl(d, (int)TIOCSETC, (char *)&t->ww_tchars) < 0) + if (ioctl(d, TIOCSETC, (char *)&t->ww_tchars) < 0) goto bad; - if (ioctl(d, (int)TIOCSLTC, (char *)&t->ww_ltchars) < 0) + if (ioctl(d, TIOCSLTC, (char *)&t->ww_ltchars) < 0) goto bad; - if (ioctl(d, (int)TIOCLSET, (char *)&t->ww_lmode) < 0) + if (ioctl(d, TIOCLSET, (char *)&t->ww_lmode) < 0) goto bad; if ((o == 0 || t->ww_ldisc != o->ww_ldisc) && - ioctl(d, (int)TIOCSETD, (char *)&t->ww_ldisc) < 0) + ioctl(d, TIOCSETD, (char *)&t->ww_ldisc) < 0) goto bad; if (fcntl(d, F_SETFL, t->ww_fflags) < 0) goto bad; -- 2.20.1