diff options
author | dholland <dholland@NetBSD.org> | 2014-03-29 20:41:57 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2014-03-29 20:41:57 +0000 |
commit | f3341c8e62b3c5b7cc556c255d2bd8b80ebb4196 (patch) | |
tree | a784c94c0bbd044a4bb711bdf37bb3d3ddbf3f44 /hunt | |
parent | 01f8a3b22d2905cfc39bd648a290b804ac4f4bb6 (diff) | |
download | bsdgames-darwin-f3341c8e62b3c5b7cc556c255d2bd8b80ebb4196.tar.gz bsdgames-darwin-f3341c8e62b3c5b7cc556c255d2bd8b80ebb4196.tar.zst bsdgames-darwin-f3341c8e62b3c5b7cc556c255d2bd8b80ebb4196.zip |
const in unused code
Diffstat (limited to 'hunt')
-rw-r--r-- | hunt/huntd/makemaze.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hunt/huntd/makemaze.c b/hunt/huntd/makemaze.c index 485363e3..77f57902 100644 --- a/hunt/huntd/makemaze.c +++ b/hunt/huntd/makemaze.c @@ -1,4 +1,4 @@ -/* $NetBSD: makemaze.c,v 1.9 2014/03/29 19:41:11 dholland Exp $ */ +/* $NetBSD: makemaze.c,v 1.10 2014/03/29 20:41:57 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: makemaze.c,v 1.9 2014/03/29 19:41:11 dholland Exp $"); +__RCSID("$NetBSD: makemaze.c,v 1.10 2014/03/29 20:41:57 dholland Exp $"); #endif /* not lint */ #include "hunt.h" @@ -70,7 +70,7 @@ makemaze(void) #define NDIR 4 #if 0 -static int dirs[NPERM][NDIR] = { +static const int dirs[NPERM][NDIR] = { {0,1,2,3}, {3,0,1,2}, {0,2,3,1}, {0,3,2,1}, {1,0,2,3}, {2,3,0,1}, {0,2,1,3}, {2,3,1,0}, {1,0,3,2}, {1,2,0,3}, {3,1,2,0}, {2,0,3,1}, @@ -79,7 +79,7 @@ static int dirs[NPERM][NDIR] = { {2,1,3,0}, {3,0,2,1}, {3,2,0,1}, {3,2,1,0} }; -static int incr[NDIR][2] = { +static const int incr[NDIR][2] = { {0, 1}, {1, 0}, {0, -1}, {-1, 0} }; @@ -87,10 +87,10 @@ static int incr[NDIR][2] = { static void dig(int y, int x) { - int *dp; - int *ip; + const int *dp; + const int *ip; int ny, nx; - int *endp; + const int *endp; Maze[y][x] = SPACE; /* Clear this spot */ dp = dirs[rand_num(NPERM)]; |