Module Name:    src
Committed By:   dholland
Date:           Mon Jul 20 06:00:56 UTC 2009

Modified Files:
        src/games/robots: auto.c extern.c flush_in.c init_field.c main.c
            make_level.c move.c move_robs.c play_level.c query.c rnd_pos.c
            robots.h score.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/robots/auto.c \
    src/games/robots/init_field.c
cvs rdiff -u -r1.8 -r1.9 src/games/robots/extern.c \
    src/games/robots/make_level.c src/games/robots/move_robs.c
cvs rdiff -u -r1.7 -r1.8 src/games/robots/flush_in.c \
    src/games/robots/play_level.c src/games/robots/query.c
cvs rdiff -u -r1.25 -r1.26 src/games/robots/main.c
cvs rdiff -u -r1.13 -r1.14 src/games/robots/move.c
cvs rdiff -u -r1.6 -r1.7 src/games/robots/rnd_pos.c
cvs rdiff -u -r1.19 -r1.20 src/games/robots/robots.h src/games/robots/score.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/robots/auto.c
diff -u src/games/robots/auto.c:1.9 src/games/robots/auto.c:1.10
--- src/games/robots/auto.c:1.9	Mon Jul 20 05:44:02 2009
+++ src/games/robots/auto.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: auto.c,v 1.9 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: auto.c,v 1.10 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -32,14 +32,14 @@
 /*
  *	Automatic move.
  *	intelligent ?
- *	Algo : 
+ *	Algo :
  *		IF scrapheaps don't exist THEN
- *			IF not in danger THEN 
+ *			IF not in danger THEN
  *				stay at current position
  *		 	ELSE
  *				move away from the closest robot
  *			FI
- *		ELSE 
+ *		ELSE
  *			find closest heap
  *			find closest robot
  *			IF scrapheap is adjacent THEN
@@ -70,16 +70,16 @@
 static int between(COORD *, COORD *);
 
 /* distance():
- * 	return "move" number distance of the two coordinates
+ * return "move" number distance of the two coordinates
  */
-static int 
+static int
 distance(int x1, int y1, int x2, int y2)
 {
 	return MAX(ABS(ABS(x1) - ABS(x2)), ABS(ABS(y1) - ABS(y2)));
 }
 
 /* xinc():
- *	Return x coordinate moves
+ * Return x coordinate moves
  */
 static int
 xinc(int dir)
@@ -101,7 +101,7 @@
 }
 
 /* yinc():
- *	Return y coordinate moves
+ * Return y coordinate moves
  */
 static int
 yinc(int dir)
@@ -123,7 +123,7 @@
 }
 
 /* find_moves():
- *	Find possible moves
+ * Find possible moves
  */
 static const char *
 find_moves(void)
@@ -136,17 +136,17 @@
         static char ans[sizeof moves];
         a = ans;
 
-        for(m = moves; *m; m++) {
+        for (m = moves; *m; m++) {
                 test.x = My_pos.x + xinc(*m);
                 test.y = My_pos.y + yinc(*m);
                 move(test.y, test.x);
                 switch(winch(stdscr)) {
                 case ' ':
                 case PLAYER:
-                        for(x = test.x - 1; x <= test.x + 1; x++) {
-                                for(y = test.y - 1; y <= test.y + 1; y++) {
+                        for (x = test.x - 1; x <= test.x + 1; x++) {
+                                for (y = test.y - 1; y <= test.y + 1; y++) {
                                         move(y, x);
-                                        if(winch(stdscr) == ROBOT)
+                                        if (winch(stdscr) == ROBOT)
 						goto bad;
                                 }
                         }
@@ -155,15 +155,15 @@
         bad:;
         }
         *a = 0;
-        if(ans[0])
+        if (ans[0])
                 return ans;
         else
                 return "t";
 }
 
 /* closest_robot():
- *	return the robot closest to us
- *	and put in dist its distance
+ * return the robot closest to us
+ * and put in dist its distance
  */
 static COORD *
 closest_robot(int *dist)
@@ -183,10 +183,10 @@
 	*dist = mindist;
 	return minrob;
 }
-			
+
 /* closest_heap():
- *	return the heap closest to us
- *	and put in dist its distance
+ * return the heap closest to us
+ * and put in dist its distance
  */
 static COORD *
 closest_heap(int *dist)
@@ -210,9 +210,9 @@
 }
 
 /* move_towards():
- *	move as close to the given direction as possible
+ * move as close to the given direction as possible
  */
-static char 
+static char
 move_towards(int dx, int dy)
 {
 	char ok_moves[10], best_move;
@@ -220,7 +220,7 @@
 	int move_judge, cur_judge, mvx, mvy;
 
 	(void)strcpy(ok_moves, find_moves());
-	best_move = ok_moves[0]; 
+	best_move = ok_moves[0];
 	if (best_move != 't') {
 		mvx = xinc(best_move);
 		mvy = yinc(best_move);
@@ -239,7 +239,7 @@
 }
 
 /* move_away():
- *	move away form the robot given
+ * move away form the robot given
  */
 static char
 move_away(COORD *rob)
@@ -253,7 +253,7 @@
 
 
 /* move_between():
- *	move the closest heap between us and the closest robot
+ * move the closest heap between us and the closest robot
  */
 static char
 move_between(COORD *rob, COORD *hp)
@@ -263,8 +263,8 @@
 
 	/* equation of the line between us and the closest robot */
 	if (My_pos.x == rob->x) {
-		/* 
-		 * me and the robot are aligned in x 
+		/*
+		 * me and the robot are aligned in x
 		 * change my x so I get closer to the heap
 		 * and my y far from the robot
 		 */
@@ -274,7 +274,7 @@
 	}
 	else if (My_pos.y == rob->y) {
 		/*
-		 * me and the robot are aligned in y 
+		 * me and the robot are aligned in y
 		 * change my y so I get closer to the heap
 		 * and my x far from the robot
 		 */
@@ -288,7 +288,7 @@
 		cons = slope * rob->y;
 		if (ABS(My_pos.x - rob->x) > ABS(My_pos.y - rob->y)) {
 			/*
-			 * we are closest to the robot in x 
+			 * we are closest to the robot in x
 			 * move away from the robot in x and
 			 * close to the scrap in y
 			 */
@@ -306,9 +306,9 @@
 		My_pos.x, My_pos.y, rob->x, rob->y, hp->x, hp->y, dx, dy));
 	return move_towards(dx, dy);
 }
-		
+
 /* between():
- * 	Return true if the heap is between us and the robot
+ * Return true if the heap is between us and the robot
  */
 int
 between(COORD *rob, COORD *hp)
@@ -333,11 +333,11 @@
 }
 
 /* automove():
- * 	find and do the best move if flag
- *	else get the first move;
+ * find and do the best move if flag
+ * else get the first move;
  */
 char
-automove(void) 
+automove(void)
 {
 #if 0
 	return  find_moves()[0];
@@ -349,20 +349,20 @@
 	robot_close = closest_robot(&robot_dist);
 	if (robot_dist > 1)
 		return('.');
-	if (!Num_scrap) 
+	if (!Num_scrap)
 		/* no scrap heaps just run away */
 		return move_away(robot_close);
 
 	heap_close = closest_heap(&heap_dist);
-	robot_heap = distance(robot_close->x, robot_close->y, 
-	    heap_close->x, heap_close->y);	
+	robot_heap = distance(robot_close->x, robot_close->y,
+	    heap_close->x, heap_close->y);
 	if (robot_heap <= heap_dist && !between(robot_close, heap_close)) {
-		/* 
+		/*
 		 * robot is closest to us from the heap. Run away!
 		 */
 		return  move_away(robot_close);
 	}
-	
+
 	return move_between(robot_close, heap_close);
 #endif
 }
Index: src/games/robots/init_field.c
diff -u src/games/robots/init_field.c:1.9 src/games/robots/init_field.c:1.10
--- src/games/robots/init_field.c:1.9	Mon Jul 20 05:44:02 2009
+++ src/games/robots/init_field.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_field.c,v 1.9 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: init_field.c,v 1.10 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)init_field.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: init_field.c,v 1.9 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: init_field.c,v 1.10 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,9 +51,9 @@
 void
 init_field(void)
 {
-	int		i;
-	static bool	first = TRUE;
-	static const char	*const desc[] = {
+	int i;
+	static bool first = TRUE;
+	static const char *const desc[] = {
 				"Directions:",
 				"",
 				"y k u",
@@ -116,7 +116,7 @@
 	if (first)
 		refresh();
 	first = FALSE;
-#ifdef	FANCY
+#ifdef FANCY
 	if (Pattern_roll)
 		Next_move = &Move_list[-1];
 #endif

Index: src/games/robots/extern.c
diff -u src/games/robots/extern.c:1.8 src/games/robots/extern.c:1.9
--- src/games/robots/extern.c:1.8	Thu Aug  7 09:37:36 2003
+++ src/games/robots/extern.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.c,v 1.8 2003/08/07 09:37:36 agc Exp $	*/
+/*	$NetBSD: extern.c,v 1.9 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,49 +34,49 @@
 #if 0
 static char sccsid[] = "@(#)extern.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: extern.c,v 1.8 2003/08/07 09:37:36 agc Exp $");
+__RCSID("$NetBSD: extern.c,v 1.9 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
-bool	Dead;			/* Player is now dead */
-bool	Full_clear = TRUE;	/* Lots of junk for init_field to clear */
-bool	Jump = FALSE;		/* Jump while running, counting, or waiting */
-bool	Newscore;		/* There was a new score added */
-#ifdef	FANCY
-bool	Pattern_roll = FALSE;	/* Auto play for YHBJNLUK pattern */
+bool Dead;			/* Player is now dead */
+bool Full_clear = TRUE;		/* Lots of junk for init_field to clear */
+bool Jump = FALSE;		/* Jump while running, counting, or waiting */
+bool Newscore;			/* There was a new score added */
+#ifdef FANCY
+bool Pattern_roll = FALSE;	/* Auto play for YHBJNLUK pattern */
 #endif
-bool	Real_time = FALSE;	/* Play in real time? */
-bool	Auto_bot = FALSE;	/* Automatic mover */
-bool	Running = FALSE;	/* Currently in the middle of a run */
-#ifdef	FANCY
-bool	Stand_still = FALSE;	/* Auto play for standing still pattern */
+bool Real_time = FALSE;		/* Play in real time? */
+bool Auto_bot = FALSE;		/* Automatic mover */
+bool Running = FALSE;		/* Currently in the middle of a run */
+#ifdef FANCY
+bool Stand_still = FALSE;	/* Auto play for standing still pattern */
 #endif
-bool	Teleport = FALSE;	/* Teleport automatically when player must */
-bool	Waiting;		/* Player is waiting for end */
-bool	Was_bonus = FALSE;	/* Was a bonus last level */
-
-char	Cnt_move;		/* Command which has preceded the count */
-char	Field[Y_FIELDSIZE][X_FIELDSIZE];	/* the playing field itslef */
-const char	*Next_move;	/* Next move to be used in the pattern */
-const char	*Move_list = "YHBJNLUK";/* List of moves in the pattern */
-char	Run_ch;			/* Character for the direction we are running */
-
-int	Count = 0;		/* Command count */
-int	Level;			/* Current level */
-int	Num_robots;		/* Number of robots left */
-int	Num_scrap;		/* Number of scrap heaps */
-int	Num_scores;		/* Number of scores posted */
-int	Num_games;		/* Number of games to play */
-u_int32_t	Score;		/* Current score */
-int	Start_level = 1;	/* Level on which to start */
-int	Wait_bonus;		/* bonus for waiting */
-
-COORD	Max;			/* Max area robots take up */
-COORD	Min;			/* Min area robots take up */
-COORD	My_pos;			/* Player's current position */
-COORD	Robots[MAXROBOTS];	/* Robots' current positions */
-COORD	Scrap[MAXROBOTS];	/* ScrapHeap' current position */
+bool Teleport = FALSE;		/* Teleport automatically when player must */
+bool Waiting;			/* Player is waiting for end */
+bool Was_bonus = FALSE;		/* Was a bonus last level */
+
+char Cnt_move;			/* Command which has preceded the count */
+char Field[Y_FIELDSIZE][X_FIELDSIZE];	/* the playing field itslef */
+const char  *Next_move;		/* Next move to be used in the pattern */
+const char *Move_list = "YHBJNLUK";/* List of moves in the pattern */
+char Run_ch;			/* Character for the direction we are running */
+
+int Count = 0;			/* Command count */
+int Level;			/* Current level */
+int Num_robots;			/* Number of robots left */
+int Num_scrap;			/* Number of scrap heaps */
+int Num_scores;			/* Number of scores posted */
+int Num_games;			/* Number of games to play */
+u_int32_t Score;		/* Current score */
+int Start_level = 1;		/* Level on which to start */
+int Wait_bonus;			/* bonus for waiting */
+
+COORD Max;			/* Max area robots take up */
+COORD Min;			/* Min area robots take up */
+COORD My_pos;			/* Player's current position */
+COORD Robots[MAXROBOTS];	/* Robots' current positions */
+COORD Scrap[MAXROBOTS];		/* ScrapHeap' current position */
 
 jmp_buf	End_move;		/* Jump to on Real_time */
Index: src/games/robots/make_level.c
diff -u src/games/robots/make_level.c:1.8 src/games/robots/make_level.c:1.9
--- src/games/robots/make_level.c:1.8	Mon Jul 20 05:44:02 2009
+++ src/games/robots/make_level.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: make_level.c,v 1.8 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: make_level.c,v 1.9 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,11 +34,11 @@
 #if 0
 static char sccsid[] = "@(#)make_level.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: make_level.c,v 1.8 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: make_level.c,v 1.9 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
 /*
  * make_level:
@@ -47,9 +47,9 @@
 void
 make_level(void)
 {
-	int	i;
-	COORD	*cp;
-	int	x;
+	int i;
+	COORD *cp;
+	int x;
 
 	reset_count();
 	for (i = 1; i < Y_FIELDSIZE; i++)
Index: src/games/robots/move_robs.c
diff -u src/games/robots/move_robs.c:1.8 src/games/robots/move_robs.c:1.9
--- src/games/robots/move_robs.c:1.8	Mon Jul 20 05:44:02 2009
+++ src/games/robots/move_robs.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: move_robs.c,v 1.8 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: move_robs.c,v 1.9 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,11 +34,11 @@
 #if 0
 static char sccsid[] = "@(#)move_robs.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: move_robs.c,v 1.8 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: move_robs.c,v 1.9 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
 /*
  * move_robots:
@@ -47,16 +47,16 @@
 void
 move_robots(int was_sig)
 {
-	COORD		*rp;
+	COORD *rp;
 
 	if (Real_time)
 		signal(SIGALRM, move_robots);
-# ifdef DEBUG
+#ifdef DEBUG
 	move(Min.y, Min.x);
 	addch(inch());
 	move(Max.y, Max.x);
 	addch(inch());
-# endif /* DEBUG */
+#endif /* DEBUG */
 	for (rp = Robots; rp < &Robots[MAXROBOTS]; rp++) {
 		if (rp->y < 0)
 			continue;
@@ -111,14 +111,14 @@
 			longjmp(End_move, 0);
 	}
 
-# ifdef DEBUG
+#ifdef DEBUG
 	standout();
 	move(Min.y, Min.x);
 	addch(inch());
 	move(Max.y, Max.x);
 	addch(inch());
 	standend();
-# endif /* DEBUG */
+#endif /* DEBUG */
 	if (Real_time)
 		alarm(3);
 }

Index: src/games/robots/flush_in.c
diff -u src/games/robots/flush_in.c:1.7 src/games/robots/flush_in.c:1.8
--- src/games/robots/flush_in.c:1.7	Mon Jul 20 05:44:02 2009
+++ src/games/robots/flush_in.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: flush_in.c,v 1.7 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: flush_in.c,v 1.8 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,11 +34,11 @@
 #if 0
 static char sccsid[] = "@(#)flush_in.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: flush_in.c,v 1.7 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: flush_in.c,v 1.8 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
 /*
  * flush_in:
Index: src/games/robots/play_level.c
diff -u src/games/robots/play_level.c:1.7 src/games/robots/play_level.c:1.8
--- src/games/robots/play_level.c:1.7	Mon Jul 20 05:44:02 2009
+++ src/games/robots/play_level.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: play_level.c,v 1.7 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: play_level.c,v 1.8 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,11 +34,11 @@
 #if 0
 static char sccsid[] = "@(#)play_level.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: play_level.c,v 1.7 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: play_level.c,v 1.8 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
 /*
  * play_level:
@@ -47,7 +47,7 @@
 void
 play_level(void)
 {
-	COORD	*cp;
+	COORD *cp;
 
 	move(My_pos.y, My_pos.x);
 	addch(PLAYER);
@@ -59,14 +59,14 @@
 		addch(ROBOT);
 	}
 	refresh();
-# ifdef DEBUG
+#ifdef DEBUG
 	standout();
 	move(Min.y, Min.x);
 	addch(inch());
 	move(Max.y, Max.x);
 	addch(inch());
 	standend();
-# endif /* DEBUG */
+#endif /* DEBUG */
 	setjmp(End_move);
 	flush_in();
 	while (!Dead && Num_robots > 0) {
Index: src/games/robots/query.c
diff -u src/games/robots/query.c:1.7 src/games/robots/query.c:1.8
--- src/games/robots/query.c:1.7	Mon Jul 20 05:44:02 2009
+++ src/games/robots/query.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.7 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: query.c,v 1.8 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,11 +34,11 @@
 #if 0
 static char sccsid[] = "@(#)query.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: query.c,v 1.7 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: query.c,v 1.8 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
 /*
  * query:
@@ -47,8 +47,8 @@
 int
 query(const char *prompt)
 {
-	int	c, retval;
-	int	y, x;
+	int c, retval;
+	int y, x;
 
 	getyx(stdscr, y, x);
 	move(Y_PROMPT, X_PROMPT);

Index: src/games/robots/main.c
diff -u src/games/robots/main.c:1.25 src/games/robots/main.c:1.26
--- src/games/robots/main.c:1.25	Mon Jul 20 05:44:02 2009
+++ src/games/robots/main.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.25 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.26 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,23 +39,23 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.25 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.26 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
-extern const char	*Scorefile;
-extern int	Max_per_uid;
+extern const char *Scorefile;
+extern int Max_per_uid;
 
 int
 main(int ac, char **av)
 {
-	const char	*sp;
-	bool	bad_arg;
-	bool	show_only;
-	int		score_wfd; /* high score writable file descriptor */
-	int		score_err = 0; /* hold errno from score file open */
+	const char *sp;
+	bool bad_arg;
+	bool show_only;
+	int score_wfd; /* high score writable file descriptor */
+	int score_err = 0; /* hold errno from score file open */
 
 	score_wfd = open(Scorefile, O_RDWR);
 	if (score_wfd < 0)
@@ -117,7 +117,7 @@
 					  case 't':
 						Teleport = TRUE;
 						break;
-					  
+
 					  default:
 						fprintf(stderr, "robots: unknown option: %c\n", *sp);
 						bad_arg = TRUE;
@@ -207,9 +207,9 @@
 bool
 another(void)
 {
-	int	y;
+	int y;
 
-#ifdef	FANCY
+#ifdef FANCY
 	if ((Stand_still || Pattern_roll) && !Newscore)
 		return TRUE;
 #endif

Index: src/games/robots/move.c
diff -u src/games/robots/move.c:1.13 src/games/robots/move.c:1.14
--- src/games/robots/move.c:1.13	Mon Jul 20 05:44:02 2009
+++ src/games/robots/move.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: move.c,v 1.13 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: move.c,v 1.14 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,13 +34,13 @@
 #if 0
 static char sccsid[] = "@(#)move.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: move.c,v 1.13 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: move.c,v 1.14 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
 #include "robots.h"
 
-# define	ESC	'\033'
+#define ESC	'\033'
 
 /*
  * get_move:
@@ -49,15 +49,15 @@
 void
 get_move(void)
 {
-	int		c;
+	int c;
 #ifdef FANCY
-	int		lastmove;
+	int lastmove;
 #endif /*FANCY*/
 
 	if (Waiting)
 		return;
 
-#ifdef	FANCY
+#ifdef FANCY
 	if (Pattern_roll) {
 		if (Next_move >= Move_list)
 			lastmove = *Next_move;
@@ -73,7 +73,7 @@
 			c = Run_ch;
 		else if (Count != 0)
 			c = Cnt_move;
-#ifdef	FANCY
+#ifdef FANCY
 		else if (Num_robots > 1 && Stand_still)
 			c = '>';
 		else if (Num_robots > 1 && Pattern_roll) {
@@ -210,10 +210,10 @@
 bool
 must_telep(void)
 {
-	int		x, y;
-	static COORD	newpos;
+	int x, y;
+	static COORD newpos;
 
-#ifdef	FANCY
+#ifdef FANCY
 	if (Stand_still && Num_robots > 1 && eaten(&My_pos))
 		return TRUE;
 #endif
@@ -242,7 +242,7 @@
 bool
 do_move(int dy, int dx)
 {
-	static COORD	newpos;
+	static COORD newpos;
 
 	newpos.y = My_pos.y + dy;
 	newpos.x = My_pos.x + dx;
@@ -278,7 +278,7 @@
 bool
 eaten(const COORD *pos)
 {
-	int	x, y;
+	int x, y;
 
 	for (y = pos->y - 1; y <= pos->y + 1; y++) {
 		if (y <= 0 || y >= Y_FIELDSIZE)

Index: src/games/robots/rnd_pos.c
diff -u src/games/robots/rnd_pos.c:1.6 src/games/robots/rnd_pos.c:1.7
--- src/games/robots/rnd_pos.c:1.6	Mon Jul 20 05:44:02 2009
+++ src/games/robots/rnd_pos.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rnd_pos.c,v 1.6 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: rnd_pos.c,v 1.7 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,13 +34,13 @@
 #if 0
 static char sccsid[] = "@(#)rnd_pos.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: rnd_pos.c,v 1.6 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: rnd_pos.c,v 1.7 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
+#include "robots.h"
 
-# define	IS_SAME(p,y,x)	((p).y != -1 && (p).y == y && (p).x == x)
+#define IS_SAME(p,y,x)	((p).y != -1 && (p).y == y && (p).x == x)
 
 /*
  * rnd_pos:
@@ -49,8 +49,8 @@
 COORD *
 rnd_pos(void)
 {
-	static COORD	pos;
-	static int	call = 0;
+	static COORD pos;
+	static int call = 0;
 
 	do {
 		pos.y = rnd(Y_FIELDSIZE - 1) + 1;

Index: src/games/robots/robots.h
diff -u src/games/robots/robots.h:1.19 src/games/robots/robots.h:1.20
--- src/games/robots/robots.h:1.19	Mon Jul 20 05:44:02 2009
+++ src/games/robots/robots.h	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: robots.h,v 1.19 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: robots.h,v 1.20 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -31,116 +31,116 @@
  *	@(#)robots.h	8.1 (Berkeley) 5/31/93
  */
 
-# include	<sys/ttydefaults.h>
-# include	<sys/endian.h>
-# include	<ctype.h>
-# include	<curses.h>
-# include	<err.h>
-# include	<errno.h>
-# include	<fcntl.h>
-# include	<pwd.h>
-# include	<setjmp.h>
-# include	<signal.h>
-# include	<stdlib.h>
-# include	<string.h>
-# include	<termios.h>
-# include	<unistd.h>
+#include <sys/ttydefaults.h>
+#include <sys/endian.h>
+#include <ctype.h>
+#include <curses.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
 
 /*
  * miscellaneous constants
  */
 
-# define	Y_FIELDSIZE	23
-# define	X_FIELDSIZE	60
-# define	Y_SIZE		24
-# define	X_SIZE		80
-# define	MAXLEVELS	4
-# define	MAXROBOTS	(MAXLEVELS * 10)
-# define	ROB_SCORE	10
-# undef		S_BONUS
-# define	S_BONUS		(60 * ROB_SCORE)
-# define	Y_SCORE		21
-# define	X_SCORE		(X_FIELDSIZE + 9)
-# define	Y_PROMPT	(Y_FIELDSIZE - 1)
-# define	X_PROMPT	(X_FIELDSIZE + 2)
-# define	MAXSCORES	(Y_SIZE - 2)
-# define	MAXNAME		16
-# define	MS_NAME		"Ten"
+#define Y_FIELDSIZE	23
+#define X_FIELDSIZE	60
+#define Y_SIZE		24
+#define X_SIZE		80
+#define MAXLEVELS	4
+#define MAXROBOTS	(MAXLEVELS * 10)
+#define ROB_SCORE	10
+#undef  S_BONUS
+#define S_BONUS		(60 * ROB_SCORE)
+#define Y_SCORE		21
+#define X_SCORE		(X_FIELDSIZE + 9)
+#define Y_PROMPT	(Y_FIELDSIZE - 1)
+#define X_PROMPT	(X_FIELDSIZE + 2)
+#define MAXSCORES	(Y_SIZE - 2)
+#define MAXNAME		16
+#define MS_NAME		"Ten"
 
 /*
  * characters on screen
  */
 
-# define	ROBOT	'+'
-# define	HEAP	'*'
-# define	PLAYER	'@'
+#define ROBOT	'+'
+#define HEAP	'*'
+#define PLAYER	'@'
 
 /*
  * type definitions
  */
 
 typedef struct {
-	int	y, x;
+	int y, x;
 } COORD;
 
 typedef struct {
-	u_int32_t	s_uid;
-	u_int32_t	s_score;
-	u_int32_t	s_auto;
-	u_int32_t	s_level;
-	char		s_name[MAXNAME];
+	u_int32_t s_uid;
+	u_int32_t s_score;
+	u_int32_t s_auto;
+	u_int32_t s_level;
+	char s_name[MAXNAME];
 } SCORE;
 
-typedef struct passwd	PASSWD;
+typedef struct passwd PASSWD;
 
 /*
  * global variables
  */
 
-extern bool	Dead, Full_clear, Jump, Newscore, Real_time, Running,
-		Teleport, Waiting, Was_bonus, Auto_bot;
+extern bool Dead, Full_clear, Jump, Newscore, Real_time, Running,
+	Teleport, Waiting, Was_bonus, Auto_bot;
 
-#ifdef	FANCY
-extern bool	Pattern_roll, Stand_still;
+#ifdef FANCY
+extern bool Pattern_roll, Stand_still;
 #endif
 
-extern char	Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], Run_ch;
+extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], Run_ch;
 extern const char *Next_move, *Move_list;
 
-extern int	Count, Level, Num_robots, Num_scrap, Num_scores,
-		Start_level, Wait_bonus, Num_games;
+extern int Count, Level, Num_robots, Num_scrap, Num_scores,
+	Start_level, Wait_bonus, Num_games;
 
-extern u_int32_t	Score;
+extern u_int32_t Score;
 
-extern COORD	Max, Min, My_pos, Robots[], Scrap[];
+extern COORD Max, Min, My_pos, Robots[], Scrap[];
 
-extern jmp_buf	End_move;
+extern jmp_buf End_move;
 
 /*
  * functions
  */
 
-void	add_score(int);
-bool	another(void);
-char	automove(void);
-int	cmp_sc(const void *, const void *);
-bool	do_move(int, int);
-bool	eaten(const COORD *);
-void	flush_in(void);
-void	get_move(void);
-void	init_field(void);
-bool	jumping(void);
-void	make_level(void);
-void	move_robots(int);
-bool	must_telep(void);
-void	play_level(void);
-int	query(const char *);
-void	quit(int) __dead;
-void	reset_count(void);
-int	rnd(int);
-COORD  *rnd_pos(void);
-void	score(int);
-void	set_name(SCORE *);
-void	show_score(void);
-int	sign(int);
-void	telmsg(int);
+void add_score(int);
+bool another(void);
+char automove(void);
+int cmp_sc(const void *, const void *);
+bool do_move(int, int);
+bool eaten(const COORD *);
+void flush_in(void);
+void get_move(void);
+void init_field(void);
+bool jumping(void);
+void make_level(void);
+void move_robots(int);
+bool must_telep(void);
+void play_level(void);
+int query(const char *);
+void quit(int) __dead;
+void reset_count(void);
+int rnd(int);
+COORD *rnd_pos(void);
+void score(int);
+void set_name(SCORE *);
+void show_score(void);
+int sign(int);
+void telmsg(int);
Index: src/games/robots/score.c
diff -u src/games/robots/score.c:1.19 src/games/robots/score.c:1.20
--- src/games/robots/score.c:1.19	Mon Jul 20 05:44:02 2009
+++ src/games/robots/score.c	Mon Jul 20 06:00:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: score.c,v 1.19 2009/07/20 05:44:02 dholland Exp $	*/
+/*	$NetBSD: score.c,v 1.20 2009/07/20 06:00:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,20 +34,20 @@
 #if 0
 static char sccsid[] = "@(#)score.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: score.c,v 1.19 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: score.c,v 1.20 2009/07/20 06:00:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-# include	"robots.h"
-# include	"pathnames.h"
+#include "robots.h"
+#include "pathnames.h"
 
-const char	*Scorefile = _PATH_SCORE;
+const char *Scorefile = _PATH_SCORE;
 
-int	Max_per_uid = MAX_PER_UID;
+int Max_per_uid = MAX_PER_UID;
 
-static SCORE	Top[MAXSCORES];
+static SCORE Top[MAXSCORES];
 
-static u_int32_t	numscores, max_uid;
+static u_int32_t numscores, max_uid;
 
 static void read_score(int);
 static void write_score(int);
@@ -59,7 +59,7 @@
 static void
 read_score(int inf)
 {
-	SCORE	*scp;
+	SCORE *scp;
 
 	if (read(inf, &max_uid, sizeof max_uid) == sizeof max_uid) {
 		max_uid = ntohl(max_uid);
@@ -86,7 +86,7 @@
 static void
 write_score(int inf)
 {
-	SCORE	*scp;
+	SCORE *scp;
 
 	lseek(inf, 0L, SEEK_SET);
 
@@ -112,10 +112,10 @@
 void
 score(int score_wfd)
 {
-	int			inf = score_wfd;
-	SCORE			*scp;
-	u_int32_t		uid;
-	bool			done_show = FALSE;
+	int inf = score_wfd;
+	SCORE *scp;
+	u_int32_t uid;
+	bool done_show = FALSE;
 
 	Newscore = FALSE;
 	if (inf < 0)
@@ -188,7 +188,7 @@
 void
 set_name(SCORE *scp)
 {
-	PASSWD	*pp;
+	PASSWD *pp;
 
 	if ((pp = getpwuid(scp->s_uid)) == NULL)
 		strncpy(scp->s_name, "???", MAXNAME);
@@ -213,8 +213,8 @@
 void
 show_score(void)
 {
-	SCORE		*scp;
-	int		inf;
+	SCORE *scp;
+	int inf;
 
 	if ((inf = open(Scorefile, O_RDONLY)) < 0) {
 		warn("opening `%s'", Scorefile);

Reply via email to