From: Sascha Wildner Date: Fri, 18 Sep 2009 12:59:00 +0000 (+0200) Subject: gcc44 warnings: Remove unused functions. X-Git-Tag: v2.4.1~73 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/551b05162c31c99361d31e00aa133e46066bfa17 gcc44 warnings: Remove unused functions. --- diff --git a/games/hunt/huntd/makemaze.c b/games/hunt/huntd/makemaze.c index 06ef40a..d85b172 100644 --- a/games/hunt/huntd/makemaze.c +++ b/games/hunt/huntd/makemaze.c @@ -42,8 +42,6 @@ # define ISCLEAR(y,x) (Maze[y][x] == SPACE) # define ODD(n) ((n) & 01) -static int candig(int, int); -static void dig(int, int); static void dig_maze(int, int); static void remap(void); @@ -83,60 +81,6 @@ int incr[NDIR][2] = { }; static void -dig(int y, int x) -{ - int *dp; - int *ip; - int ny, nx; - int *endp; - - Maze[y][x] = SPACE; /* Clear this spot */ - dp = dirs[rand_num(NPERM)]; - endp = &dp[NDIR]; - while (dp < endp) { - ip = &incr[*dp++][0]; - ny = y + *ip++; - nx = x + *ip; - if (candig(ny, nx)) - dig(ny, nx); - } -} - -/* - * candig: - * Is it legal to clear this spot? - */ -static int -candig(int y, int x) -{ - int i; - - if (ODD(x) && ODD(y)) - return FALSE; /* can't touch ODD spots */ - - if (y < UBOUND || y >= DBOUND) - return FALSE; /* Beyond vertical bounds, NO */ - if (x < LBOUND || x >= RBOUND) - return FALSE; /* Beyond horizontal bounds, NO */ - - if (ISCLEAR(y, x)) - return FALSE; /* Already clear, NO */ - - i = ISCLEAR(y, x + 1); - i += ISCLEAR(y, x - 1); - if (i > 1) - return FALSE; /* Introduces cycle, NO */ - i += ISCLEAR(y + 1, x); - if (i > 1) - return FALSE; /* Introduces cycle, NO */ - i += ISCLEAR(y - 1, x); - if (i > 1) - return FALSE; /* Introduces cycle, NO */ - - return TRUE; /* OK */ -} - -static void dig_maze(int x, int y) { int tx, ty;