Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/atc Pass lint(1).



details:   https://anonhg.NetBSD.org/src/rev/b0bd02584b5c
branches:  trunk
changeset: 583538:b0bd02584b5c
user:      rpaulo <rpaulo%NetBSD.org@localhost>
date:      Wed Aug 10 17:53:28 2005 +0000

description:
Pass lint(1).

diffstat:

 games/atc/extern.c   |    6 +-
 games/atc/extern.h   |    4 +-
 games/atc/graphics.c |  252 +++++++++++++++++++++++++-------------------------
 games/atc/input.c    |   54 ++++++----
 games/atc/log.c      |   94 +++++++++---------
 games/atc/main.c     |   94 +++++++++---------
 games/atc/update.c   |   15 +-
 7 files changed, 271 insertions(+), 248 deletions(-)

diffs (truncated from 1261 to 300 lines):

diff -r 33c0370dd511 -r b0bd02584b5c games/atc/extern.c
--- a/games/atc/extern.c        Wed Aug 10 17:52:56 2005 +0000
+++ b/games/atc/extern.c        Wed Aug 10 17:53:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.c,v 1.8 2005/07/01 00:48:34 jmc Exp $   */
+/*     $NetBSD: extern.c,v 1.9 2005/08/10 17:53:28 rpaulo Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)extern.c   8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: extern.c,v 1.8 2005/07/01 00:48:34 jmc Exp $");
+__RCSID("$NetBSD: extern.c,v 1.9 2005/08/10 17:53:28 rpaulo Exp $");
 #endif
 #endif /* not lint */
 
@@ -58,7 +58,9 @@
 
 const char     *filename;
 
+#if 0
 FILE           *filein, *fileout;
+#endif
 
 C_SCREEN               screen, *sp = &screen;
 
diff -r 33c0370dd511 -r b0bd02584b5c games/atc/extern.h
--- a/games/atc/extern.h        Wed Aug 10 17:52:56 2005 +0000
+++ b/games/atc/extern.h        Wed Aug 10 17:53:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.12 2005/07/01 00:48:34 jmc Exp $  */
+/*     $NetBSD: extern.h,v 1.13 2005/08/10 17:53:28 rpaulo Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -48,7 +48,9 @@
 
 extern int             clck, safe_planes, start_time, test_mode;
 
+#if 0
 extern FILE            *filein, *fileout;
+#endif 
 
 extern C_SCREEN                screen, *sp;
 
diff -r 33c0370dd511 -r b0bd02584b5c games/atc/graphics.c
--- a/games/atc/graphics.c      Wed Aug 10 17:52:56 2005 +0000
+++ b/games/atc/graphics.c      Wed Aug 10 17:53:28 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: graphics.c,v 1.11 2005/07/01 00:48:34 jmc Exp $        */
+/*     $NetBSD: graphics.c,v 1.12 2005/08/10 17:53:28 rpaulo Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: graphics.c,v 1.11 2005/07/01 00:48:34 jmc Exp $");
+__RCSID("$NetBSD: graphics.c,v 1.12 2005/08/10 17:53:28 rpaulo Exp $");
 #endif
 #endif /* not lint */
 
@@ -81,12 +81,12 @@
        PLANE   *pp;
 
        for (pp = air.head; pp != NULL; pp = pp->next) {
-               wmove(cleanradar, pp->ypos, pp->xpos * 2);
-               wmove(radar, pp->ypos, pp->xpos * 2);
-               waddch(radar, winch(cleanradar));
-               wmove(cleanradar, pp->ypos, pp->xpos * 2 + 1);
-               wmove(radar, pp->ypos, pp->xpos * 2 + 1);
-               waddch(radar, winch(cleanradar));
+               (void)wmove(cleanradar, pp->ypos, pp->xpos * 2);
+               (void)wmove(radar, pp->ypos, pp->xpos * 2);
+               (void)waddch(radar, winch(cleanradar));
+               (void)wmove(cleanradar, pp->ypos, pp->xpos * 2 + 1);
+               (void)wmove(radar, pp->ypos, pp->xpos * 2 + 1);
+               (void)waddch(radar, winch(cleanradar));
        }
 }
 
@@ -97,17 +97,17 @@
 
        for (pp = air.head; pp != NULL; pp = pp->next) {
                if (pp->status == S_MARKED)
-                       wstandout(radar);
-               wmove(radar, pp->ypos, pp->xpos * 2);
-               waddch(radar, name(pp));
-               waddch(radar, '0' + pp->altitude);
+                       (void)wstandout(radar);
+               (void)wmove(radar, pp->ypos, pp->xpos * 2);
+               (void)waddch(radar, name(pp));
+               (void)waddch(radar, '0' + pp->altitude);
                if (pp->status == S_MARKED)
-                       wstandend(radar);
+                       (void)wstandend(radar);
        }
-       wrefresh(radar);
-       planewin();
-       wrefresh(input);                /* return cursor */
-       fflush(stdout);
+       (void)wrefresh(radar);
+       (void)planewin();
+       (void)wrefresh(input);          /* return cursor */
+       (void)fflush(stdout);
 }
 
 void
@@ -115,7 +115,7 @@
 {
        static char     buffer[BUFSIZ];
 
-       initscr();
+       (void)initscr();
        setbuf(stdout, buffer);
        input = newwin(INPUT_LINES, COLS - PLANE_COLS, LINES - INPUT_LINES, 0);
        credit = newwin(INPUT_LINES, PLANE_COLS, LINES - INPUT_LINES, 
@@ -133,27 +133,27 @@
        str[2] = '\0';
 
        if (radar != NULL)
-               delwin(radar);
+               (void)delwin(radar);
        radar = newwin(scp->height, scp->width * 2, 0, 0);
 
        if (cleanradar != NULL)
-               delwin(cleanradar);
+               (void)delwin(cleanradar);
        cleanradar = newwin(scp->height, scp->width * 2, 0, 0);
 
        /* minus one here to prevent a scroll */
        for (i = 0; i < PLANE_COLS - 1; i++) {
-               wmove(credit, 0, i);
-               waddch(credit, C_CREDIT);
-               wmove(credit, INPUT_LINES - 1, i);
-               waddch(credit, C_CREDIT);
+               (void)wmove(credit, 0, i);
+               (void)waddch(credit, C_CREDIT);
+               (void)wmove(credit, INPUT_LINES - 1, i);
+               (void)waddch(credit, C_CREDIT);
        }
-       wmove(credit, INPUT_LINES / 2, 1);
-       waddstr(credit, AUTHOR_STR);
+       (void)wmove(credit, INPUT_LINES / 2, 1);
+       (void)waddstr(credit, AUTHOR_STR);
 
        for (i = 1; i < scp->height - 1; i++) {
                for (j = 1; j < scp->width - 1; j++) {
-                       wmove(radar, i, j * 2);
-                       waddch(radar, C_BACKROUND);
+                       (void)wmove(radar, i, j * 2);
+                       (void)waddch(radar, C_BACKROUND);
                }
        }
 
@@ -170,49 +170,49 @@
 
        str[0] = C_TOPBOTTOM;
        str[1] = C_TOPBOTTOM;
-       wmove(radar, 0, 0);
+       (void)wmove(radar, 0, 0);
        for (i = 0; i < scp->width - 1; i++)
-               waddstr(radar, str);
-       waddch(radar, C_TOPBOTTOM);
+               (void)waddstr(radar, str);
+       (void)waddch(radar, C_TOPBOTTOM);
 
        str[0] = C_TOPBOTTOM;
        str[1] = C_TOPBOTTOM;
-       wmove(radar, scp->height - 1, 0);
+       (void)wmove(radar, scp->height - 1, 0);
        for (i = 0; i < scp->width - 1; i++)
-               waddstr(radar, str);
-       waddch(radar, C_TOPBOTTOM);
+               (void)waddstr(radar, str);
+       (void)waddch(radar, C_TOPBOTTOM);
 
        for (i = 1; i < scp->height - 1; i++) {
-               wmove(radar, i, 0);
-               waddch(radar, C_LEFTRIGHT);
-               wmove(radar, i, (scp->width - 1) * 2);
-               waddch(radar, C_LEFTRIGHT);
+               (void)wmove(radar, i, 0);
+               (void)waddch(radar, C_LEFTRIGHT);
+               (void)wmove(radar, i, (scp->width - 1) * 2);
+               (void)waddch(radar, C_LEFTRIGHT);
        }
 
        str[0] = C_BEACON;
        for (i = 0; i < scp->num_beacons; i++) {
                str[1] = '0' + i;
-               wmove(radar, scp->beacon[i].y, scp->beacon[i].x * 2);
-               waddstr(radar, str);
+               (void)wmove(radar, scp->beacon[i].y, scp->beacon[i].x * 2);
+               (void)waddstr(radar, str);
        }
 
        for (i = 0; i < scp->num_exits; i++) {
-               wmove(radar, scp->exit[i].y, scp->exit[i].x * 2);
-               waddch(radar, '0' + i);
+               (void)wmove(radar, scp->exit[i].y, scp->exit[i].x * 2);
+               (void)waddch(radar, '0' + i);
        }
 
        airstr = "^?>?v?<?";
        for (i = 0; i < scp->num_airports; i++) {
                str[0] = airstr[scp->airport[i].dir];
                str[1] = '0' + i;
-               wmove(radar, scp->airport[i].y, scp->airport[i].x * 2);
-               waddstr(radar, str);
+               (void)wmove(radar, scp->airport[i].y, scp->airport[i].x * 2);
+               (void)waddstr(radar, str);
        }
        
-       overwrite(radar, cleanradar);
-       wrefresh(radar);
-       wrefresh(credit);
-       fflush(stdout);
+       (void)overwrite(radar, cleanradar);
+       (void)wrefresh(radar);
+       (void)wrefresh(credit);
+       (void)fflush(stdout);
 }
 
 void
@@ -223,8 +223,8 @@
        dx = SGN(lx - x);
        dy = SGN(ly - y);
        for (;;) {
-               wmove(w, y, x * 2);
-               waddstr(w, s);
+               (void)wmove(w, y, x * 2);
+               (void)waddstr(w, s);
                if (x == lx && y == ly)
                        break;
                x += dx;
@@ -235,35 +235,35 @@
 void
 ioclrtoeol(int pos)
 {
-       wmove(input, 0, pos);
-       wclrtoeol(input);
-       wrefresh(input);
-       fflush(stdout);
+       (void)wmove(input, 0, pos);
+       (void)wclrtoeol(input);
+       (void)wrefresh(input);
+       (void)fflush(stdout);
 }
 
 void
 iomove(int pos)
 {
-       wmove(input, 0, pos);
-       wrefresh(input);
-       fflush(stdout);
+       (void)wmove(input, 0, pos);
+       (void)wrefresh(input);
+       (void)fflush(stdout);
 }
 
 void
 ioaddstr(int pos, const char *str)
 {
-       wmove(input, 0, pos);
-       waddstr(input, str);
-       wrefresh(input);
-       fflush(stdout);
+       (void)wmove(input, 0, pos);
+       (void)waddstr(input, str);
+       (void)wrefresh(input);
+       (void)fflush(stdout);
 }
 
 void
 ioclrtobot(void)
 {
-       wclrtobot(input);
-       wrefresh(input);
-       fflush(stdout);
+       (void)wclrtobot(input);
+       (void)wrefresh(input);
+       (void)fflush(stdout);
 }
 
 void
@@ -271,15 +271,16 @@
 {
        int     i;
 
-       wmove(input, 1, pos);
+       (void)wmove(input, 1, pos);
        for (i = 0; i < len; i++)
-               waddch(input, '^');
-       wmove(input, 2, 0);
-       waddstr(input, str);
-       wrefresh(input);



Home | Main Index | Thread Index | Old Index