summaryrefslogtreecommitdiffstats
path: root/mbbsd/gomo1.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-04 21:08:35 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-04 21:08:35 +0800
commit9e81baf8352b3d525c9a1459f28dae6b540988e3 (patch)
treea558e73187b9d45b59280a79c927e7f8bb315623 /mbbsd/gomo1.c
parente42291049072cfee02408394850b33b3580dbd83 (diff)
downloadpttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar.gz
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar.bz2
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar.lz
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar.xz
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.tar.zst
pttbbs-9e81baf8352b3d525c9a1459f28dae6b540988e3.zip
global variable move to var.c
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@280 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gomo1.c')
-rw-r--r--mbbsd/gomo1.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/mbbsd/gomo1.c b/mbbsd/gomo1.c
index 953bad2d..c741f538 100644
--- a/mbbsd/gomo1.c
+++ b/mbbsd/gomo1.c
@@ -1,24 +1,9 @@
-/* $Id: gomo1.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include "config.h"
-#include "pttstruct.h"
-#include "proto.h"
+/* $Id: gomo1.c,v 1.2 2002/06/04 13:08:33 in2 Exp $ */
+#include "bbs.h"
#define QCAST int (*)(const void *, const void *)
-#define BBLANK (0) /* 空白 */
-#define BBLACK (1) /* 黑子, 先手 */
-#define BWHITE (2) /* 白子, 後手 */
-#ifndef BRDSIZ
-#define BRDSIZ (15) /* 棋盤單邊大小 */
-#endif
-
-extern char ku[BRDSIZ][BRDSIZ];
-
/* pattern and advance map */
-extern unsigned char *pat, *adv;
static int intrevcmp(const void *a, const void *b) {
return (*(int *)b - *(int *)a);
@@ -62,7 +47,7 @@ int chkwin(int style, int limit) {
/* x,y: 0..BRDSIZ-1 ; color: CBLACK,CWHITE ; limit:1,0 ; dx,dy: 0,1 */
static int dirchk(int x, int y, int color, int limit, int dx, int dy) {
- int le, ri, loc, style;
+ int le, ri, loc, style = 0;
le = gomo_getindex(x, y, color, -dx, -dy);
ri = gomo_getindex(x, y, color, dx, dy);
@@ -78,7 +63,7 @@ static int dirchk(int x, int y, int color, int limit, int dx, int dy) {
style >>= 4;
if((style == 3) || (style == 2)) {
- int i, n, tmp, nx, ny;
+ int i, n = 0, tmp, nx, ny;
n = adv[loc >> 1];