From 2add58a2ade1df6e5eb36efb38bd0099ccf6e348 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 18 Sep 2009 14:59:00 +0200 Subject: [PATCH] gcc44 warnings: Remove unused functions. --- games/hunt/huntd/makemaze.c | 56 ------------------------------------- 1 file changed, 56 deletions(-) diff --git a/games/hunt/huntd/makemaze.c b/games/hunt/huntd/makemaze.c index 06ef40a943..d85b172745 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); @@ -82,60 +80,6 @@ int incr[NDIR][2] = { {0, 1}, {1, 0}, {0, -1}, {-1, 0} }; -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) { -- 2.41.0