Source-Changes-HG archive

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

[src/trunk]: src/games/hunt/huntd const in unused code



details:   https://anonhg.NetBSD.org/src/rev/886e5acebe0b
branches:  trunk
changeset: 794979:886e5acebe0b
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Mar 29 20:41:57 2014 +0000

description:
const in unused code

diffstat:

 games/hunt/huntd/makemaze.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 26600e3dc11e -r 886e5acebe0b games/hunt/huntd/makemaze.c
--- a/games/hunt/huntd/makemaze.c       Sat Mar 29 20:35:30 2014 +0000
+++ b/games/hunt/huntd/makemaze.c       Sat Mar 29 20:41:57 2014 +0000
@@ -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 @@
 #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 @@
        {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 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)];



Home | Main Index | Thread Index | Old Index