]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - robots/main.c
Changed deprecated curses call to new equivalent.
[bsdgames-darwin.git] / robots / main.c
index e772774a795e3855aed31c77004b71870b089ee3..3cb81a0b442c4762bf4f3ddcab825a39fff315c5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.14 2000/01/19 19:19:43 jsm Exp $    */
+/*     $NetBSD: main.c,v 1.18 2001/12/06 12:17:57 blymn Exp $  */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.14 2000/01/19 19:19:43 jsm Exp $");
+__RCSID("$NetBSD: main.c,v 1.18 2001/12/06 12:17:57 blymn Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,6 +51,9 @@ __RCSID("$NetBSD: main.c,v 1.14 2000/01/19 19:19:43 jsm Exp $");
 
 int main __P((int, char **));
 
+extern const char      *Scorefile;
+extern int     Max_per_uid;
+
 int
 main(ac, av)
        int     ac;
@@ -59,8 +62,6 @@ main(ac, av)
        const char      *sp;
        bool    bad_arg;
        bool    show_only;
-       extern const char       *Scorefile;
-       extern int      Max_per_uid;
        int             score_wfd; /* high score writable file descriptor */
        int             score_err = 0; /* hold errno from score file open */
 
@@ -71,7 +72,7 @@ main(ac, av)
                exit(1);
 
        /* Revoke setgid privileges */
-       setregid(getgid(), getgid());
+       setgid(getgid());
 
        show_only = FALSE;
        Num_games = 1;
@@ -151,7 +152,7 @@ main(ac, av)
 
        initscr();
        signal(SIGINT, quit);
-       crmode();
+       cbreak();
        noecho();
        nonl();
        if (LINES != Y_SIZE || COLS != X_SIZE) {
@@ -187,6 +188,7 @@ main(ac, av)
                                sleep(1);
                        refresh();
                }
+               Num_games = 1;
        } while (!Auto_bot && another());
        quit(0);
        /* NOTREACHED */