Source-Changes-HG archive

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

[src/trunk]: src/games/robots Add missing prototypes



details:   https://anonhg.NetBSD.org/src/rev/7160e445695a
branches:  trunk
changeset: 472996:7160e445695a
user:      christos <christos%NetBSD.org@localhost>
date:      Sun May 16 00:03:35 1999 +0000

description:
Add missing prototypes

diffstat:

 games/robots/auto.c   |  18 +++++++++++++-----
 games/robots/robots.h |   3 ++-
 games/robots/score.c  |   7 +++++--
 3 files changed, 20 insertions(+), 8 deletions(-)

diffs (85 lines):

diff -r 56fb9571ae41 -r 7160e445695a games/robots/auto.c
--- a/games/robots/auto.c       Sat May 15 23:56:35 1999 +0000
+++ b/games/robots/auto.c       Sun May 16 00:03:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auto.c,v 1.1 1999/05/15 23:56:35 christos Exp $        */
+/*     $NetBSD: auto.c,v 1.2 1999/05/16 00:03:35 christos Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,6 +67,16 @@
 
 #define CONSDEBUG(a)
 
+static int distance __P((int, int, int, int));
+static int xinc __P((int));
+static int yinc __P((int));
+static char *find_moves __P((void));
+static COORD *closest_robot __P((int *));
+static COORD *closest_heap __P((int *));
+static char move_towards __P((int, int));
+static char move_away __P((COORD *));
+static char move_between __P((COORD *, COORD *));
+static int between __P((COORD *, COORD *));
 
 /* distance():
  *     return "move" number distance of the two coordinates
@@ -266,9 +276,7 @@
        COORD *rob;
        COORD *hp;
 {
-       char ok_moves[10], best_move;
-       char *ptr;
-       int move_judge, cur_judge, dx, dy, mvx, mvy;
+       int dx, dy;
        float slope, cons;
 
        /* equation of the line between us and the closest robot */
@@ -377,4 +385,4 @@
        
        return move_between(robot_close, heap_close);
 #endif
-} /* end get_move */
+} /* end automove */
diff -r 56fb9571ae41 -r 7160e445695a games/robots/robots.h
--- a/games/robots/robots.h     Sat May 15 23:56:35 1999 +0000
+++ b/games/robots/robots.h     Sun May 16 00:03:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: robots.h,v 1.9 1999/05/15 23:56:36 christos Exp $      */
+/*     $NetBSD: robots.h,v 1.10 1999/05/16 00:03:35 christos Exp $     */
 
 /*
  * Copyright (c) 1980, 1993
@@ -141,3 +141,4 @@
 void   set_name __P((SCORE *));
 void   show_score __P((void));
 int    sign __P((int));
+char   automove __P((void));
diff -r 56fb9571ae41 -r 7160e445695a games/robots/score.c
--- a/games/robots/score.c      Sat May 15 23:56:35 1999 +0000
+++ b/games/robots/score.c      Sun May 16 00:03:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: score.c,v 1.6 1999/05/15 23:56:36 christos Exp $       */
+/*     $NetBSD: score.c,v 1.7 1999/05/16 00:03:35 christos Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)score.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: score.c,v 1.6 1999/05/15 23:56:36 christos Exp $");
+__RCSID("$NetBSD: score.c,v 1.7 1999/05/16 00:03:35 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,6 +53,9 @@
 
 static u_int32_t       numscores, max_uid;
 
+static void read_score __P((int));
+static void write_score __P((int));
+
 /*
  * read_score:
  *     Read the score file in MI format



Home | Main Index | Thread Index | Old Index