Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.PCS 1/10/84; site mtgzz.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!drutx!mtuxo!mtgzz!deg From: deg@mtgzz.UUCP (d.e.gillespie) Newsgroups: net.sources.games Subject: Re: yao yet another othello program Message-ID: <960@mtgzz.UUCP> Date: Tue, 23-Jul-85 20:25:24 EDT Article-I.D.: mtgzz.960 Posted: Tue Jul 23 20:25:24 1985 Date-Received: Fri, 26-Jul-85 06:42:55 EDT References: <176@motel6.UUCP> Organization: AT&T Information Systems Labs, Middletown NJ Lines: 47 There are some assumptions your code makes about the target machine, in particular in the use of 'char' variables. On many targets, a char is never negative! In your program, the board is stored as a char array, and so far this is the only problem i noticed. The easiest solution was to add this line to reversi.h: typdef short int boardE; The diff listings of the affected files follows: ***** diff between gencor.c.BAK and gencor.c 5c5 < char board[9]; --- > boardE board[9]; ***** diff between genedge.c.BAK and genedge.c 5c5 < char board[9]; --- > boardE board[9]; ***** diff between legal.c.BAK and legal.c 9c9 < register char *b, *m; --- > register boardE *b, *m; ***** diff between move.c.BAK and move.c 16c16 < register char *b, *m; --- > register boardE *b, *m; 42c42 < register char *b, *m; --- > register boardE *b, *m; ***** diff between reversi.h.BAK and reversi.h 8,9c8,9 < < typedef short int boardT[SIZE+2][SIZE+2]; --- > typedef short int boardE; > typedef boardE boardT[SIZE+2][SIZE+2]; ***** diff between score.c.BAK and score.c 49,50c49,50 < register char *j, *b; < char *l; --- > register boardE *j, *b; > boardE *l;