home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xboard / part03 < prev    next >
Text File  |  1991-06-26  |  51KB  |  1,450 lines

  1. Path: uunet!uunet!cs.utexas.edu!sun-barr!cronkite!exodus!Pa.dec.com!dbs
  2. From: dbs@Pa.dec.com
  3. Newsgroups: comp.sources.x
  4. Subject: v13i059: xboard, Part03/06
  5. Message-ID: <15684@exodus.Eng.Sun.COM>
  6. Date: 24 Jun 91 13:40:35 GMT
  7. References: <csx-13i057-xboard@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 1438
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: dbs@Pa.dec.com
  13. Posting-number: Volume 13, Issue 59
  14. Archive-name: xboard/part03
  15.  
  16. ---- Cut Here and feed the following to sh ----
  17. #!/bin/sh
  18. # this is xx.03 (part 3 of a multipart archive)
  19. # do not concatenate these parts, unpack them in order with /bin/sh
  20. # file xboard/xboard.man continued
  21. #
  22. if test ! -r _shar_seq_.tmp; then
  23.     echo 'Please unpack part 1 first!'
  24.     exit 1
  25. fi
  26. (read Scheck
  27.  if test "$Scheck" != 3; then
  28.     echo Please unpack part "$Scheck" next!
  29.     exit 1
  30.  else
  31.     exit 0
  32.  fi
  33. ) < _shar_seq_.tmp || exit 1
  34. if test ! -f _shar_wnt_.tmp; then
  35.     echo 'x - still skipping xboard/xboard.man'
  36. else
  37. echo 'x - continuing file xboard/xboard.man'
  38. sed 's/^X//' << 'SHAR_EOF' >> 'xboard/xboard.man' &&
  39. ..IR xboard .
  40. ..SH SEE ALSO
  41. ..IR xchess (1),
  42. ..IR gnuchess (1)
  43. ..SH LIMITATIONS
  44. ..LP
  45. Doesn't handle black to play positions.
  46. ..LP
  47. White must be on move for two program mode to work.
  48. ..LP
  49. Only recognizes algebraic notation.
  50. ..LP
  51. If you press the Pause button during GNU Chess's turn
  52. ..IR xboard .
  53. will stop the clocks,
  54. but GNU Chess will still make a move.
  55. ..LP
  56. If you play out an opening set of moves with
  57. ..IR "Play From File" ,
  58. you must make a move and then select
  59. ..IR "Machine Black" .
  60. ..LP
  61. -iconic doesn't work properly.
  62. ..SH COPYRIGHT
  63. ..LP
  64. Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
  65. ..LP
  66. All Rights Reserved
  67. ..LP
  68. Permission to use, copy, modify, and distribute this software and its
  69. documentation for any purpose and without fee is hereby granted,
  70. provided that the above copyright notice appear in all copies and that
  71. both that copyright notice and this permission notice appear in
  72. supporting documentation, and that the name of Digital not be
  73. used in advertising or publicity pertaining to distribution of the
  74. software without specific, written prior permission.
  75. ..LP
  76. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  77. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  78. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  79. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  80. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  81. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  82. SOFTWARE.
  83. SHAR_EOF
  84. echo 'File xboard/xboard.man is complete' &&
  85. chmod 0644 xboard/xboard.man ||
  86. echo 'restore of xboard/xboard.man failed'
  87. Wc_c="`wc -c < 'xboard/xboard.man'`"
  88. test 11585 -eq "$Wc_c" ||
  89.     echo 'xboard/xboard.man: original size 11585, current size' "$Wc_c"
  90. rm -f _shar_wnt_.tmp
  91. fi
  92. # ============= xboard/patchlevel.h ==============
  93. if test -f 'xboard/patchlevel.h' -a X"$1" != X"-c"; then
  94.     echo 'x - skipping xboard/patchlevel.h (File already exists)'
  95.     rm -f _shar_wnt_.tmp
  96. else
  97. > _shar_wnt_.tmp
  98. echo 'x - extracting xboard/patchlevel.h (Text)'
  99. sed 's/^X//' << 'SHAR_EOF' > 'xboard/patchlevel.h' &&
  100. #define PATCHLEVEL 4
  101. SHAR_EOF
  102. chmod 0644 xboard/patchlevel.h ||
  103. echo 'restore of xboard/patchlevel.h failed'
  104. Wc_c="`wc -c < 'xboard/patchlevel.h'`"
  105. test 21 -eq "$Wc_c" ||
  106.     echo 'xboard/patchlevel.h: original size 21, current size' "$Wc_c"
  107. rm -f _shar_wnt_.tmp
  108. fi
  109. # ============= xboard/parser.l ==============
  110. if test -f 'xboard/parser.l' -a X"$1" != X"-c"; then
  111.     echo 'x - skipping xboard/parser.l (File already exists)'
  112.     rm -f _shar_wnt_.tmp
  113. else
  114. > _shar_wnt_.tmp
  115. echo 'x - extracting xboard/parser.l (Text)'
  116. sed 's/^X//' << 'SHAR_EOF' > 'xboard/parser.l' &&
  117. %{
  118. /*
  119. X * parser.l -- lex parser of algebraic chess moves for XBoard
  120. X *
  121. X * Chris Sears
  122. X *
  123. X * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
  124. X *
  125. X * All Rights Reserved
  126. X *
  127. X * Permission to use, copy, modify, and distribute this software and its
  128. X * documentation for any purpose and without fee is hereby granted,
  129. X * provided that the above copyright notice appear in all copies and that
  130. X * both that copyright notice and this permission notice appear in
  131. X * supporting documentation, and that the name of Digital not be
  132. X * used in advertising or publicity pertaining to distribution of the
  133. X * software without specific, written prior permission.
  134. X *
  135. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  136. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  137. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  138. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  139. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  140. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  141. X * SOFTWARE.
  142. X *
  143. X * This parser handles all forms of promotion.
  144. X * XBoard and GnuChess only handle queen promotion.
  145. X * The parser resolves ambiguous moves by searching and check-testing.
  146. X * It also parses comments of the form [anything] and ! to end of line.
  147. X */
  148. #include "xboard.h"
  149. #include <ctype.h>
  150. #include <string.h>
  151. X
  152. enum { False, True };
  153. X
  154. #define A_I(ch)            (tolower(ch) - 'a')
  155. #define NO_CONSTRAINT    -1
  156. #undef input
  157. X
  158. #define KING_TEST(r, f, piece) { \
  159. X    if ((r >= 0) && (r < BOARD_SIZE) && (f >= 0) && (f < BOARD_SIZE)) { \
  160. X        if (boards[currentMove][r][f] == (ChessSquare) piece) { \
  161. X            currentMoveString[0] = f + 'a'; \
  162. X            currentMoveString[1] = r + '1'; \
  163. X            break; \
  164. X        } \
  165. X    } \
  166. }
  167. X
  168. #define PIECE_TEST(r, f, piece) { \
  169. X    if ((r >= 0) && (r < BOARD_SIZE) && (f >= 0) && (f < BOARD_SIZE)) { \
  170. X        if (boards[currentMove][r][f] == (ChessSquare) piece) { \
  171. X            if (! CheckTest(rank, file, r, f)) { \
  172. X                currentMoveString[0] = f + 'a'; \
  173. X                currentMoveString[1] = r + '1'; \
  174. X                break; \
  175. X            } \
  176. X        } \
  177. X    } \
  178. }
  179. X
  180. #define PROMOTION_PIECE(p) { \
  181. X    currentMoveString[5] = '\n'; \
  182. X    currentMoveString[6] = '\0'; \
  183. X    switch (p) { \
  184. X    case 'n': case 'N': \
  185. X        currentMoveString[4] = 'n'; \
  186. X        return WHITE_ON_MOVE \
  187. X            ? (int) WhitePromotionKnight : (int) BlackPromotionKnight; \
  188. X    case 'b': case 'B': \
  189. X        currentMoveString[4] = 'b'; \
  190. X        return WHITE_ON_MOVE \
  191. X            ? (int) WhitePromotionBishop : (int) BlackPromotionBishop; \
  192. X    case 'r': case 'R': \
  193. X        currentMoveString[4] = 'r'; \
  194. X        return WHITE_ON_MOVE \
  195. X            ? (int) WhitePromotionRook : (int) BlackPromotionRook; \
  196. X    case 'q': case 'Q': \
  197. X        currentMoveString[4] = 'q'; \
  198. X        return WHITE_ON_MOVE \
  199. X            ? (int) WhitePromotionQueen : (int) BlackPromotionQueen; \
  200. X    default: \
  201. X        return (int) BadMove; \
  202. X    } \
  203. }
  204. X
  205. extern Board    boards[MAX_MOVES];
  206. extern int        currentMove;
  207. extern int        xboardDebug;
  208. extern FILE        *gameFileFP;
  209. char            currentMoveString[YYLMAX];
  210. X
  211. static int RookSearch P((int *rank, int *file,
  212. X    ChessSquare piece, Board b, int recurse, int constraint));
  213. static int BishopSearch P((int *rank, int *file,
  214. X    ChessSquare piece, Board b, int recurse, int constraint));
  215. static int CheckTest P((int rt, int ft, int rf, int ff));
  216. static int yywrap P((void));
  217. static int input P((void));
  218. extern void CopyBoard P((Board to, Board from));
  219. X
  220. %}
  221. %%
  222. X
  223. !.*$                        { return (int) Comment; }    /* combining doesn't work */
  224. \[[^\]]*\]                    { return (int) Comment; }
  225. [ \t\n]                        { ; }                /* skip white space */
  226. X
  227. [a-hA-H][1-8][a-hA-H][1-8]|[a-hA-H][1-8][a-hA-H][1-8]\(?[RrBbNnQq]\)?|[a-hA-H][1-8][xX-][a-hA-H][1-8]|[a-hA-H][1-8][xX-][a-hA-H][1-8]\(?[RrBbNnQq]\)?    {
  228. /*
  229. X * Simple algebraic move with promotion
  230. X */
  231. X        /*
  232. X         * remove the [xX-] to simplify the logic
  233. X         */
  234. X        if ((yytext[2] == 'x') || (yytext[2] == 'X') || (yytext[2] == '-')) {
  235. X            int i;
  236. X
  237. X            for (i = 2, yyleng--; i < yyleng + 1; i++)
  238. X                yytext[i] = yytext[i + 1];
  239. X        }
  240. X
  241. X        strcpy(currentMoveString, yytext);
  242. X        currentMoveString[4] = '\n';
  243. X        currentMoveString[5] = '\0';
  244. X
  245. X        if (yyleng == 4)
  246. X            return (int) NormalMove;
  247. X        if (yyleng > 5) {
  248. X            PROMOTION_PIECE(yytext[5]);
  249. X        } else {
  250. X            PROMOTION_PIECE(yytext[4]);
  251. X        }
  252. X    }
  253. X
  254. [a-hA-H][1-8]|[a-hA-H][1-8]\(?[RrBbNnQq]\)?    {
  255. /*
  256. X * Pawn move with promotion
  257. X */
  258. X        int rank = yytext[1] - '1', file = A_I(yytext[0]);
  259. X
  260. X        currentMoveString[0] = yytext[0];
  261. X        currentMoveString[1] = yytext[1];
  262. X        currentMoveString[2] = yytext[0];
  263. X        currentMoveString[3] = yytext[1];
  264. X        currentMoveString[4] = '\n';
  265. X        currentMoveString[5] = '\0';
  266. X
  267. X        if (WHITE_ON_MOVE) {
  268. X            if (boards[currentMove][rank - 1][file] == WhitePawn)
  269. X                currentMoveString[1]--;
  270. X            else
  271. X                currentMoveString[1] -= 2;
  272. X        } else {
  273. X            if (boards[currentMove][rank + 1][file] == BlackPawn)
  274. X                currentMoveString[1]++;
  275. X            else
  276. X                currentMoveString[1] += 2;
  277. X        }
  278. X
  279. X        if (yyleng == 2)
  280. X            return (int) NormalMove;
  281. X        if (yyleng > 3) {
  282. X            PROMOTION_PIECE(yytext[3]);
  283. X        } else {
  284. X            PROMOTION_PIECE(yytext[2]);
  285. X        }
  286. X    }
  287. X
  288. [a-h][a-h]|[a-h][a-h]\([RrBbNnQq]\)|[a-h][xX][a-h]|[a-h][xX][a-h]\([RrBbNnQq]\)    {
  289. /*
  290. X * Pawn capture with promotion
  291. X */
  292. X        int i, p, file0, file1;
  293. X
  294. X        /*
  295. X         * remove the [xX] to simplify the logic
  296. X         */
  297. X        if ((yytext[1] == 'x') || (yytext[1] == 'X'))
  298. X            for (i = 1, yyleng--; i < yyleng + 1; i++)
  299. X                yytext[i] = yytext[i + 1];
  300. X
  301. X        file0 = A_I(yytext[0]);
  302. X        file1 = A_I(yytext[1]);
  303. X
  304. X        currentMoveString[0] = yytext[0];
  305. X        currentMoveString[2] = yytext[1];
  306. X        currentMoveString[4] = '\n';
  307. X        currentMoveString[5] = '\0';
  308. X
  309. X        if (WHITE_ON_MOVE) {
  310. X            for (i = 1; i < BOARD_SIZE - 1; i++) {
  311. X                if (boards[currentMove][i][file0] == WhitePawn) {
  312. X                    p = (int) boards[currentMove][i + 1][file1];
  313. X                    if (((i == 4) && (p == (int) EmptySquare)    /* en passant */
  314. X                        && (boards[currentMove][i][file1] == BlackPawn)) ||
  315. X                        ((p >= (int) BlackPawn) && (p <= (int) BlackQueen))) {
  316. X
  317. X                        currentMoveString[1] = '1' + i;
  318. X                        currentMoveString[3] = '1' + i + 1;
  319. X                        if (p == EmptySquare)
  320. X                            return (int) WhiteCapturesEnPassant;
  321. X                        if (yyleng == 2)
  322. X                            return (int) NormalMove;
  323. X                        PROMOTION_PIECE(yytext[3]);
  324. X                    }
  325. X                }
  326. X            }
  327. X        } else {
  328. X            for (i = 1; i < BOARD_SIZE - 1; i++) {
  329. X                if (boards[currentMove][i][file0] == BlackPawn) {
  330. X                    p = (int) boards[currentMove][i - 1][file1];
  331. X                    if (((i == 3) && (p == (int) EmptySquare)    /* en passant */
  332. X                        && (boards[currentMove][i][file1] == WhitePawn)) ||
  333. X                        ((p >= (int) WhitePawn) && (p <= (int) WhiteQueen))) {
  334. X
  335. X                        currentMoveString[1] = '1' + i;
  336. X                        currentMoveString[3] = '1' + i - 1;
  337. X                        if (p == EmptySquare)
  338. X                            return (int) BlackCapturesEnPassant;
  339. X                        if (yyleng == 2)
  340. X                            return (int) NormalMove;
  341. X                        PROMOTION_PIECE(yytext[3]);
  342. X                    }
  343. X                }
  344. X            }
  345. X        }
  346. X
  347. X        return (int) BadMove;
  348. X    }
  349. X
  350. [a-h][a-h][1-8]|[a-h][a-h][1-8]\([RrBbNnQq]\)|[a-h][xX][a-h][1-8]|[a-h][xX][a-h][1-8]\([RrBbNnQq]\)    {
  351. /*
  352. X * ambiguous Pawn capture with promotion
  353. X */
  354. X        int i;
  355. X
  356. X        /*
  357. X         * remove the [xX] to simplify the logic
  358. X         */
  359. X        if ((yytext[1] == 'x') || (yytext[1] == 'X'))
  360. X            for (i = 1, yyleng--; i < yyleng + 1; i++)
  361. X                yytext[i] = yytext[i + 1];
  362. X
  363. X        currentMoveString[0] = yytext[0];
  364. X        currentMoveString[4] = '\n';
  365. X        currentMoveString[5] = '\0';
  366. X
  367. X        if (WHITE_ON_MOVE) {
  368. X            if ((yytext[2] == '5') &&
  369. X                (boards[currentMove][4][A_I(yytext[0])] == WhitePawn) &&
  370. X                (boards[currentMove][5][A_I(yytext[1])] == EmptySquare)) {
  371. X                currentMoveString[1] = '5';
  372. X                currentMoveString[2] = yytext[1];
  373. X                currentMoveString[3] = '6';
  374. X                return (int) WhiteCapturesEnPassant;
  375. X            }
  376. X        } else {
  377. X            if ((yytext[2] == '4') &&
  378. X                (boards[currentMove][3][A_I(yytext[0])] == BlackPawn) &&
  379. X                (boards[currentMove][2][A_I(yytext[1])] == EmptySquare)) {
  380. X                currentMoveString[1] = '4';
  381. X                currentMoveString[2] = yytext[1];
  382. X                currentMoveString[3] = '3';
  383. X                return (int) BlackCapturesEnPassant;
  384. X            }
  385. X        }
  386. X
  387. X        currentMoveString[2] = yytext[1];
  388. X        currentMoveString[3] = yytext[2];
  389. X        if (WHITE_ON_MOVE)
  390. X            currentMoveString[1] = yytext[2] - 1;
  391. X        else
  392. X            currentMoveString[1] = yytext[2] + 1;
  393. X
  394. X        if (yyleng == 3)
  395. X            return (int) NormalMove;
  396. X
  397. X        PROMOTION_PIECE(yytext[4]);
  398. X    }
  399. X
  400. [RrBbNnQqKk][a-hA-H][1-8]|[RrBbNnQqKk][xX][a-hA-H][1-8]    {
  401. /*
  402. X * piece move
  403. X */
  404. X        int p, rank, file;
  405. X
  406. X        if ((yytext[1] == 'x') || (yytext[1] == 'X')) {
  407. X            currentMoveString[2] = yytext[2];
  408. X            currentMoveString[3] = yytext[3];
  409. X            rank = yytext[3] - '1'; file = A_I(yytext[2]);
  410. X        } else {
  411. X            currentMoveString[2] = yytext[1];
  412. X            currentMoveString[3] = yytext[2];
  413. X            rank = yytext[2] - '1'; file = A_I(yytext[1]);
  414. X        }
  415. X
  416. X        currentMoveString[4] = '\n';
  417. X        currentMoveString[5] = '\0';
  418. X
  419. X        switch (yytext[0]) {
  420. X        case 'R': case 'r':
  421. X            if (!RookSearch(&rank, &file, WHITE_ON_MOVE ? WhiteRook
  422. X                : BlackRook, boards[currentMove], (int) True, NO_CONSTRAINT))
  423. X                return (int) BadMove;
  424. X
  425. X            currentMoveString[0] = file + 'a';
  426. X            currentMoveString[1] = rank + '1';
  427. X
  428. X            break;
  429. X        case 'B': case 'b':
  430. X            if (!BishopSearch(&rank, &file, WHITE_ON_MOVE ? WhiteBishop
  431. X                : BlackBishop, boards[currentMove], (int) True, NO_CONSTRAINT))
  432. X                return (int) BadMove;
  433. X
  434. X            currentMoveString[0] = file + 'a';
  435. X            currentMoveString[1] = rank + '1';
  436. X
  437. X            break;
  438. X        case 'N': case 'n':
  439. X            p = (int) (WHITE_ON_MOVE ? WhiteKnight : BlackKnight);
  440. X            PIECE_TEST(rank - 2, file - 1, p);
  441. X            PIECE_TEST(rank - 1, file - 2, p);
  442. X            PIECE_TEST(rank + 1, file - 2, p);
  443. X            PIECE_TEST(rank + 2, file - 1, p);
  444. X            PIECE_TEST(rank + 2, file + 1, p);
  445. X            PIECE_TEST(rank + 1, file + 2, p);
  446. X            PIECE_TEST(rank - 1, file + 2, p);
  447. X            PIECE_TEST(rank - 2, file + 1, p);
  448. X            return (int) BadMove;
  449. X            break;
  450. X        case 'Q': case 'q':
  451. X            if (!RookSearch(&rank, &file, WHITE_ON_MOVE ? WhiteQueen
  452. X                : BlackQueen, boards[currentMove], (int) True, NO_CONSTRAINT))
  453. X                if (!BishopSearch(&rank, &file, WHITE_ON_MOVE ? WhiteQueen
  454. X                    : BlackQueen, boards[currentMove], (int) True, NO_CONSTRAINT))
  455. X                    return (int) BadMove;
  456. X
  457. X            currentMoveString[0] = file + 'a';
  458. X            currentMoveString[1] = rank + '1';
  459. X
  460. X            break;
  461. X        case 'K': case 'k':
  462. X            p = (int) (WHITE_ON_MOVE ? WhiteKing : BlackKing);
  463. X            KING_TEST(rank - 1, file - 1, p);
  464. X            KING_TEST(rank, file - 1, p);
  465. X            KING_TEST(rank + 1, file - 1, p);
  466. X            KING_TEST(rank + 1, file, p);
  467. X            KING_TEST(rank + 1, file + 1, p);
  468. X            KING_TEST(rank, file + 1, p);
  469. X            KING_TEST(rank - 1, file + 1, p);
  470. X            KING_TEST(rank - 1, file, p);
  471. X            break;
  472. X        }
  473. X
  474. X        return (int) NormalMove;
  475. X    }
  476. X
  477. [RrBbNnQqKk][a-hA-H0-7][a-hA-H][1-8]|[RrBbNnQqKk][a-hA-H0-7][xX][a-hA-H][1-8]    {
  478. /*
  479. X * ambiguous piece move
  480. X */
  481. X        int p, c, rank, file;
  482. X
  483. X        if ((yytext[2] == 'x') || (yytext[2] == 'X')) {
  484. X            currentMoveString[2] = yytext[3];
  485. X            currentMoveString[3] = yytext[4];
  486. X            rank = yytext[4] - '1'; file = A_I(yytext[3]);
  487. X        } else {
  488. X            currentMoveString[2] = yytext[2];
  489. X            currentMoveString[3] = yytext[3];
  490. X            rank = yytext[3] - '1'; file = A_I(yytext[2]);
  491. X        }
  492. X
  493. X        currentMoveString[4] = '\n';
  494. X        currentMoveString[5] = '\0';
  495. X
  496. X        c = tolower(yytext[1]);
  497. X
  498. X        switch (yytext[0]) {
  499. X        case 'R': case 'r':
  500. X            if (!RookSearch(&rank, &file, WHITE_ON_MOVE ? WhiteRook
  501. X                : BlackRook, boards[currentMove], (int) True, yytext[1]))
  502. X                return (int) BadMove;
  503. X
  504. X            currentMoveString[0] = file + 'a';
  505. X            currentMoveString[1] = rank + '1';
  506. X
  507. X            break;
  508. X        case 'B': case 'b':
  509. X            if (!BishopSearch(&rank, &file, WHITE_ON_MOVE ? WhiteBishop
  510. X                : BlackBishop, boards[currentMove], (int) True, yytext[1]))
  511. X                return (int) BadMove;
  512. X
  513. X            currentMoveString[0] = file + 'a';
  514. X            currentMoveString[1] = rank + '1';
  515. X
  516. X            break;
  517. X        case 'N': case 'n':
  518. X            p = (int) (WHITE_ON_MOVE ? WhiteKnight : BlackKnight);
  519. X            if (isalpha(c)) {
  520. X                c -= 'a';
  521. X                if ((file - 1) == c) {
  522. X                    PIECE_TEST(rank - 2, file - 1, p);
  523. X                    PIECE_TEST(rank + 2, file - 1, p);
  524. X                }
  525. X                if ((file - 2) == c) {
  526. X                    PIECE_TEST(rank - 1, file - 2, p);
  527. X                    PIECE_TEST(rank + 1, file - 2, p);
  528. X                }
  529. X                if ((file + 1) == c) {
  530. X                    PIECE_TEST(rank + 2, file + 1, p);
  531. X                    PIECE_TEST(rank - 2, file + 1, p);
  532. X                }
  533. X                if ((file + 2) == c) {
  534. X                    PIECE_TEST(rank + 1, file + 2, p);
  535. X                    PIECE_TEST(rank - 1, file + 2, p);
  536. X                }
  537. X            } else {
  538. X                c -= '1';
  539. X                if ((rank - 2) == c) {
  540. X                    PIECE_TEST(rank - 2, file - 1, p);
  541. X                    PIECE_TEST(rank - 2, file + 1, p);
  542. X                }
  543. X                if ((rank - 1) == c) {
  544. X                    PIECE_TEST(rank - 1, file - 2, p);
  545. X                    PIECE_TEST(rank - 1, file + 2, p);
  546. X                }
  547. X                if ((rank + 2) == c) {
  548. X                    PIECE_TEST(rank + 2, file - 1, p);
  549. X                    PIECE_TEST(rank + 2, file + 1, p);
  550. X                }
  551. X                if ((rank + 1) == c) {
  552. X                    PIECE_TEST(rank + 1, file - 2, p);
  553. X                    PIECE_TEST(rank + 1, file + 2, p);
  554. X                }
  555. X            }
  556. X            break;
  557. X        case 'Q': case 'q':
  558. X            if (!RookSearch(&rank, &file, WHITE_ON_MOVE ? WhiteQueen
  559. X                : BlackQueen, boards[currentMove], (int) True, yytext[1]))
  560. X                if (!BishopSearch(&rank, &file, WHITE_ON_MOVE ? WhiteQueen
  561. X                    : BlackQueen, boards[currentMove], (int) True, yytext[1]))
  562. X                    return (int) BadMove;
  563. X
  564. X            currentMoveString[0] = file + 'a';
  565. X            currentMoveString[1] = rank + '1';
  566. X
  567. X            break;
  568. X        }
  569. X
  570. X        return (int) NormalMove;
  571. X    }
  572. X
  573. 000|0-0-0|ooo|OOO|o-o-o|O-O-O    {
  574. X        strcpy(currentMoveString, "O-O-O\n");
  575. X        if (WHITE_ON_MOVE)
  576. X            return (int) WhiteQueenSideCastle;
  577. X        else
  578. X            return (int) BlackQueenSideCastle;
  579. X    }
  580. X
  581. 00|0-0|oo|OO|o-o|O-O    {
  582. X        strcpy(currentMoveString, "O-O\n");
  583. X        if (WHITE_ON_MOVE)
  584. X            return (int) WhiteKingSideCastle;
  585. X        else
  586. X            return (int) BlackKingSideCastle;
  587. X    }
  588. X
  589. [Rr][Ee][Ss][Ii][Gg][Nn]    {
  590. X        if (WHITE_ON_MOVE)
  591. X            return (int) BlackWins;
  592. X        else
  593. X            return (int) WhiteWins;
  594. X    }
  595. X
  596. [Mm][Aa][Tt][Ee]            {
  597. X        if (WHITE_ON_MOVE)
  598. X            return (int) WhiteWins;
  599. X        else
  600. X            return (int) BlackWins;
  601. X    }
  602. X
  603. [Dd][Rr][Aa][Ww]|1\/2        { return (int) GameIsDrawn; }
  604. [Ww][Hh][Ii][Tt][Ee]        { return (int) WhiteWins; }
  605. [Bb][Ll][Aa][Cc][Kk]        { return (int) BlackWins; }
  606. 1-0                            { return (int) WhiteWins; }
  607. 0-1                            { return (int) BlackWins; }
  608. X
  609. [1-9][0-9]*\.|[1-9][0-9]*    {            /* Parse and skip move numbers */
  610. X    if ((yyleng == 1) && (yytext[0] == '1'))
  611. X        return (int) StartGame;
  612. X    if ((yyleng == 2) && (yytext[0] == '1') && (yytext[1] == '.'))
  613. X        return (int) StartGame;
  614. }
  615. X
  616. ..                            { ; }        /* Skip everything else */
  617. X
  618. %%
  619. X
  620. static int
  621. RookSearch(rank, file, piece, b, recurse, constraint)
  622. X    int *rank, *file, recurse, constraint;
  623. X    ChessSquare piece;
  624. X    Board b;
  625. {
  626. X    int i, r = *rank, f = *file;
  627. X
  628. X    /*
  629. X     * Start from the target space and work outwards towards the piece.
  630. X     * This is necessary for check testing.
  631. X     */
  632. X    for (i = f + 1;; i++) {
  633. X        if (i >= BOARD_SIZE)
  634. X            break;
  635. X        if (isalpha(constraint) && (i != A_I(constraint)))
  636. X            continue;
  637. X        if (isdigit(constraint) && (i != (constraint - '1')))
  638. X            continue;
  639. X        if ((b[r][i] != EmptySquare) && (b[r][i] != piece))
  640. X            break;
  641. X        if (recurse)
  642. X            if (CheckTest(r, f, r, i))
  643. X                continue;
  644. X        if (b[r][i] == piece) {
  645. X            *file = i;
  646. X            return (int) True;
  647. X        }
  648. X    }
  649. X
  650. X    for (i = f - 1;; i--) {
  651. X        if (i < 0)
  652. X            break;
  653. X        if (isalpha(constraint) && (i != A_I(constraint)))
  654. X            continue;
  655. X        if (isdigit(constraint) && (i != (constraint - '1')))
  656. X            continue;
  657. X        if ((b[r][i] != EmptySquare) && (b[r][i] != piece))
  658. X            break;
  659. X        if (recurse)
  660. X            if (CheckTest(r, f, r, i))
  661. X                continue;
  662. X        if (b[r][i] == piece) {
  663. X            *file = i;
  664. X            return (int) True;
  665. X        }
  666. X    }
  667. X
  668. X    for (i = r + 1;; i++) {
  669. X        if (i >= BOARD_SIZE)
  670. X            break;
  671. X        if (isdigit(constraint) && (i != (constraint - '1')))
  672. X            continue;
  673. X        if (isalpha(constraint) && (i != A_I(constraint)))
  674. X            continue;
  675. X        if ((b[i][f] != EmptySquare) && (b[i][f] != piece))
  676. X            break;
  677. X        if (recurse)
  678. X            if (CheckTest(r, f, i, f))
  679. X                continue;
  680. X        if (b[i][f] == piece) {
  681. X            *rank = i;
  682. X            return (int) True;
  683. X        }
  684. X    }
  685. X
  686. X    for (i = r - 1;; i--) {
  687. X        if (i < 0)
  688. X            break;
  689. X        if (isdigit(constraint) && (i != (constraint - '1')))
  690. X            continue;
  691. X        if (isalpha(constraint) && (i != A_I(constraint)))
  692. X            continue;
  693. X        if ((b[i][f] != EmptySquare) && (b[i][f] != piece))
  694. X            break;
  695. X        if (recurse)
  696. X            if (CheckTest(r, f, i, f))
  697. X                continue;
  698. X        if (b[i][f] == piece) {
  699. X            *rank = i;
  700. X            return (int) True;
  701. X        }
  702. X    }
  703. X
  704. X    return (int) False;
  705. }
  706. X
  707. static int
  708. BishopSearch(rank, file, piece, b, recurse, constraint)
  709. X    int *rank, *file, recurse, constraint;
  710. X    ChessSquare piece;
  711. X    Board b;
  712. {
  713. X    int i, j, r = *rank, f = *file;
  714. X
  715. X    /*
  716. X     * Start from the target space and work outwards towards the piece.
  717. X     * This is necessary for check testing.
  718. X     */
  719. X    for (i = r + 1, j = f + 1;; i++, j++) {
  720. X        if ((i >= BOARD_SIZE) || (j >= BOARD_SIZE))
  721. X            break;
  722. X        if (isalpha(constraint) && (j != A_I(constraint)))
  723. X            continue;
  724. X        if (isdigit(constraint) && (j != (constraint - '1')))
  725. X            continue;
  726. X        if ((b[i][j] != EmptySquare) && (b[i][j] != piece))
  727. X            break;
  728. X        if (recurse)
  729. X            if (CheckTest(r, f, i, j))
  730. X                continue;
  731. X        if (b[i][j] == piece) {
  732. X            *rank = i;
  733. X            *file = j;
  734. X            return (int) True;
  735. X        }
  736. X    }
  737. X
  738. X    for (i = r + 1, j = f - 1;; i++, j--) {
  739. X        if ((i >= BOARD_SIZE) || (j < 0))
  740. X            break;
  741. X        if (isalpha(constraint) && (j != A_I(constraint)))
  742. X            continue;
  743. X        if (isdigit(constraint) && (j != (constraint - '1')))
  744. X            continue;
  745. X        if ((b[i][j] != EmptySquare) && (b[i][j] != piece))
  746. X            break;
  747. X        if (recurse)
  748. X            if (CheckTest(r, f, i, j))
  749. X                continue;
  750. X        if (b[i][j] == piece) {
  751. X            *rank = i;
  752. X            *file = j;
  753. X            return (int) True;
  754. X        }
  755. X    }
  756. X
  757. X    for (i = r - 1, j = f + 1;; i--, j++) {
  758. X        if ((i < 0) || (j >= BOARD_SIZE))
  759. X            break;
  760. X        if (isalpha(constraint) && (j != A_I(constraint)))
  761. X            continue;
  762. X        if (isdigit(constraint) && (j != (constraint - '1')))
  763. X            continue;
  764. X        if ((b[i][j] != EmptySquare) && (b[i][j] != piece))
  765. X            break;
  766. X        if (recurse)
  767. X            if (CheckTest(r, f, i, j))
  768. X                continue;
  769. X        if (b[i][j] == piece) {
  770. X            *rank = i;
  771. X            *file = j;
  772. X            return (int) True;
  773. X        }
  774. X    }
  775. X
  776. X    for (i = r - 1, j = f - 1;; i--, j--) {
  777. X        if ((i < 0) || (j < 0))
  778. X            break;
  779. X        if (isalpha(constraint) && (j != A_I(constraint)))
  780. X            continue;
  781. X        if (isdigit(constraint) && (j != (constraint - '1')))
  782. X            continue;
  783. X        if ((b[i][j] != EmptySquare) && (b[i][j] != piece))
  784. X            break;
  785. X        if (recurse)
  786. X            if (CheckTest(r, f, i, j))
  787. X                continue;
  788. X        if (b[i][j] == piece) {
  789. X            *rank = i;
  790. X            *file = j;
  791. X            return (int) True;
  792. X        }
  793. X    }
  794. X
  795. X    return (int) False;
  796. }
  797. X
  798. static int
  799. CheckTest(rt, ft, rf, ff)
  800. X    int rt, ft, rf, ff;
  801. {
  802. X    int rk, fk, rank, file;
  803. X    Board b;
  804. X
  805. X    CopyBoard(b, boards[currentMove]);
  806. X    b[rt][ft] = b[rf][ff];
  807. X    b[rf][ff] = EmptySquare;
  808. X
  809. X    /*
  810. X     * the bad move must have uncovered check by a rook, bishop or queen.
  811. X     */
  812. X    if (WHITE_ON_MOVE) {                /* Is the white king in check? */
  813. X        for (rk = 0; rk < BOARD_SIZE; rk++) {
  814. X            for (fk = 0; fk < BOARD_SIZE; fk++) {
  815. X                if (b[rk][fk] == WhiteKing) {
  816. X                    rank = rk; file = fk;
  817. X                    if (BishopSearch(&rank, &file, BlackBishop,
  818. X                        b, (int) False, NO_CONSTRAINT))
  819. X                        return (int) True;
  820. X                    rank = rk; file = fk;
  821. X                    if (RookSearch(&rank, &file, BlackRook,
  822. X                        b, (int) False, NO_CONSTRAINT))
  823. X                        return (int) True;
  824. X                    rank = rk; file = fk;
  825. X                    if (BishopSearch(&rank, &file, BlackQueen,
  826. X                        b, (int) False, NO_CONSTRAINT))
  827. X                        return (int) True;
  828. X                    rank = rk; file = fk;
  829. X                    if (RookSearch(&rank, &file, BlackQueen,
  830. X                        b, (int) False, NO_CONSTRAINT))
  831. X                        return (int) True;
  832. X                    return (int) False;
  833. X                }
  834. X            }
  835. X        }
  836. X    } else {                            /* Is the black king in check? */
  837. X        for (rk = 0; rk < BOARD_SIZE; rk++) {
  838. X            for (fk = 0; fk < BOARD_SIZE; fk++) {
  839. X                if (b[rk][fk] == BlackKing) {
  840. X                    rank = rk; file = fk;
  841. X                    if (BishopSearch(&rank, &file, WhiteBishop,
  842. X                        b, (int) False, NO_CONSTRAINT))
  843. X                        return (int) True;
  844. X                    rank = rk; file = fk;
  845. X                    if (RookSearch(&rank, &file, WhiteRook,
  846. X                        b, (int) False, NO_CONSTRAINT))
  847. X                        return (int) True;
  848. X                    rank = rk; file = fk;
  849. X                    if (BishopSearch(&rank, &file, WhiteQueen,
  850. X                        b, (int) False, NO_CONSTRAINT))
  851. X                        return (int) True;
  852. X                    rank = rk; file = fk;
  853. X                    if (RookSearch(&rank, &file, WhiteQueen,
  854. X                        b, (int) False, NO_CONSTRAINT))
  855. X                        return (int) True;
  856. X                    return (int) False;
  857. X                }
  858. X            }
  859. X        }
  860. X    }
  861. X
  862. X    return (int) False;
  863. }
  864. X
  865. static int
  866. yywrap()
  867. {
  868. X    return (int) True;
  869. }
  870. X
  871. static int
  872. input()
  873. {
  874. X    if (feof(gameFileFP))
  875. X        return 0;
  876. X    else
  877. X        return fgetc(gameFileFP);
  878. }
  879. SHAR_EOF
  880. chmod 0644 xboard/parser.l ||
  881. echo 'restore of xboard/parser.l failed'
  882. Wc_c="`wc -c < 'xboard/parser.l'`"
  883. test 19769 -eq "$Wc_c" ||
  884.     echo 'xboard/parser.l: original size 19769, current size' "$Wc_c"
  885. rm -f _shar_wnt_.tmp
  886. fi
  887. # ============= xboard/match ==============
  888. if test -f 'xboard/match' -a X"$1" != X"-c"; then
  889.     echo 'x - skipping xboard/match (File already exists)'
  890.     rm -f _shar_wnt_.tmp
  891. else
  892. > _shar_wnt_.tmp
  893. echo 'x - extracting xboard/match (Text)'
  894. sed 's/^X//' << 'SHAR_EOF' > 'xboard/match' &&
  895. #!/bin/sh
  896. #
  897. # match -- play a series of games using xboard as a referee
  898. #
  899. X
  900. case $# in
  901. 8) COUNT=0; HOST1=$2 ; HOST2=$4 ; LENGTH=$6 ; MODE=$8 ;;
  902. *) echo "Usage: match -host1 host -host2 host -length \
  903. games -mode (Init | Position | Opening)" ; exit
  904. esac
  905. X
  906. while (:)
  907. do
  908. X    if (test $COUNT -eq $LENGTH)
  909. X    then
  910. X        break
  911. X    else
  912. X        COUNT=`echo $COUNT | awk '{print $0 + 1}'`
  913. X        MODULO=`echo $COUNT | awk '{print $0 % 2}'`
  914. X        if (test $MODULO -eq 0)
  915. X        then
  916. X            xboard -iconic -firstHost $HOST1 -secondHost $HOST2 \
  917. X                -matchMode $MODE -saveGameFile match.game.$COUNT \
  918. X                -savePositionFile match.position.$COUNT
  919. X        else
  920. X            xboard -iconic -firstHost $HOST2 -secondHost $HOST1 \
  921. X                -matchMode $MODE -saveGameFile match.game.$COUNT \
  922. X                -savePositionFile match.position.$COUNT
  923. X        fi
  924. X    fi
  925. done
  926. SHAR_EOF
  927. chmod 0755 xboard/match ||
  928. echo 'restore of xboard/match failed'
  929. Wc_c="`wc -c < 'xboard/match'`"
  930. test 893 -eq "$Wc_c" ||
  931.     echo 'xboard/match: original size 893, current size' "$Wc_c"
  932. rm -f _shar_wnt_.tmp
  933. fi
  934. # ============= xboard/TODO ==============
  935. if test -f 'xboard/TODO' -a X"$1" != X"-c"; then
  936.     echo 'x - skipping xboard/TODO (File already exists)'
  937.     rm -f _shar_wnt_.tmp
  938. else
  939. > _shar_wnt_.tmp
  940. echo 'x - extracting xboard/TODO (Text)'
  941. sed 's/^X//' << 'SHAR_EOF' > 'xboard/TODO' &&
  942. 2. add more gnuchess switches
  943. 3. human-human playing
  944. 4. xor piece while user moves it
  945. 5. gray background for dark squares in 1-bit mode
  946. 6. alternate promotion code
  947. 7. positions assume that White is on move
  948. 8. slow down TwoMachines mode
  949. 9. manual position setup
  950. 10. add time odds to record-file
  951. 12. analog clocks, scoresheet text widget, jail
  952. 13. -iconic doesn't work correctly
  953. 14. indicator for force moves mode
  954. SHAR_EOF
  955. chmod 0644 xboard/TODO ||
  956. echo 'restore of xboard/TODO failed'
  957. Wc_c="`wc -c < 'xboard/TODO'`"
  958. test 412 -eq "$Wc_c" ||
  959.     echo 'xboard/TODO: original size 412, current size' "$Wc_c"
  960. rm -f _shar_wnt_.tmp
  961. fi
  962. # ============= xboard/README ==============
  963. if test -f 'xboard/README' -a X"$1" != X"-c"; then
  964.     echo 'x - skipping xboard/README (File already exists)'
  965.     rm -f _shar_wnt_.tmp
  966. else
  967. > _shar_wnt_.tmp
  968. echo 'x - extracting xboard/README (Text)'
  969. sed 's/^X//' << 'SHAR_EOF' > 'xboard/README' &&
  970. XXBoard Version 1.2
  971. X
  972. Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
  973. X
  974. All Rights Reserved
  975. X
  976. Permission to use, copy, modify, and distribute this software and its
  977. documentation for any purpose and without fee is hereby granted,
  978. provided that the above copyright notice appear in all copies and that
  979. both that copyright notice and this permission notice appear in
  980. supporting documentation, and that the name of Digital not be
  981. used in advertising or publicity pertaining to distribution of the
  982. software without specific, written prior permission.
  983. X
  984. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  985. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  986. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  987. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  988. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  989. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  990. SOFTWARE.
  991. X
  992. XXBoard is an X11/R4-based user interface for GNU Chess.  It uses the R4 Athena
  993. widgets and Xt Intrinsics to provide an interactive referee for managing
  994. a chess game between a user and a computer opponent or between two computers.
  995. You can also use XBoard without a chess program to play through games in files
  996. or to play through games manually (force mode).  In this case, moves aren't
  997. validated by XBoard.  XBoard manages a digital chess clock for each player
  998. and resets the clocks if time control is achieved within a given number of
  999. moves.  A game can be started with the initial chess position, with a series
  1000. of moves from a game file or with a position from a position file.  The "match"
  1001. shell script runs a series of games between two machines, alternating sides.
  1002. The man page xboard.1 describes the features of XBoard.
  1003. X
  1004. XXBoard was written by Dan Sears and Chris Sears.  XBoard borrows its colors,
  1005. icon and piece bitmaps from xchess which was written and copyrighted by
  1006. Wayne Christopher.  We thank him for his work on XChess.
  1007. X
  1008. X
  1009. CAVEATS
  1010. X
  1011. XXBoard depends on the R4 Xt Intrinsics and R4 Athena Widget Set.  R3 won't do.
  1012. XXBoard works best with the version 3.1+ of gnuchess.  There has been one patch
  1013. and it is necessary.  This release of gnuchess was dated: Mon Apr 15 10:20 1991
  1014. by Mike McGann and should be available from comp.sources.misc archives.
  1015. GNU Chess must be compiled with the -DCHESSTOOL option for use with XBoard.
  1016. X
  1017. gnuchess version 3.1+ is available on gatekeeper.dec.com
  1018. in /pub/comp.sources.misc/volume19/gnuchess
  1019. X
  1020. If you DO NOT have the 3.1+ version of gnuchess then you MUST add the following
  1021. to your .Xdefaults file:
  1022. X
  1023. XXBoard*whiteString:                     white\n
  1024. XXBoard*blackString:                     black\n
  1025. X
  1026. X
  1027. CHANGES
  1028. X
  1029. Version 1.1 -- Mon Jan  7 14:46:03 PST 1991
  1030. X
  1031. X  - Fixed a bug in HandleUserMove() where the user could make a move while the
  1032. X    machine was thinking.  The fix detects and ignores these moves.  onMove
  1033. X    was not being used and was removed.
  1034. X
  1035. X  - Substantially rewrote and simplified the clock code.  If a game was paused
  1036. X    and then resumed, the clocks were out of sync.
  1037. X
  1038. X  - Konstantinos Konstantinides added the -searchTime option.
  1039. X
  1040. X  - Rewrote TwoMachinesPlay mode.
  1041. X
  1042. X  - Rewrote DisplayClocks().
  1043. X
  1044. X  - Hal Peterson contributed a new Imakefile.
  1045. X
  1046. X  - Added a declaration, xtVersion, which will quickly break on R3 Intrinsics.
  1047. X
  1048. X  - For people who don't like or use chess clocks a clockMode switch
  1049. X    has been added.  It is on by default.  It can be turned off in the
  1050. X    .Xdefaults file with
  1051. X
  1052. X        XBoard.clockMode:    False
  1053. X
  1054. X  - Detect if the visual doesn't support color.  If so, run in monoMode.
  1055. X    An alternative would be to detect grayscale visual and use a collection
  1056. X    of gray user interface colors.
  1057. X
  1058. X  - Works with gcc now.  gcc complained about casting float constants
  1059. X    as XtPointers.
  1060. X
  1061. X  - Added keyboard equivalents.  Added an iconify keystroke, C or c.
  1062. X
  1063. X  - Added StrStr() because many systems don't have this ANSI function.
  1064. X
  1065. X  - Substantially rewrote and simplified the Two Machine code.
  1066. X
  1067. X  - The bitmaps have been pushed into the bitmaps directory.
  1068. X
  1069. X  - Fixed a bug where a player could play after a game had been finished.
  1070. X
  1071. X  - Fixed a bug where hint didn't work.  The local version of gnuchessr
  1072. X    had been hacked.  The fix was to clone stderr and stdout for gnuchessr.
  1073. X
  1074. X  - Kayvan Sylvan contributed a patch for ESIX.
  1075. X    It seems that select() on pipes is broken on his system.  We declined
  1076. X    to incorporate his patch though, because it was a work-around for
  1077. X    something that was broken on one system, and selfishly, that system
  1078. X    was not my own.  Nevertheless, it is likely that other System V users
  1079. X    on PC's may need to use this patch and it is is included as the file
  1080. X    ESIX.patch.  To use it, type
  1081. X
  1082. X        patch xboard.c ESIX.patch
  1083. X
  1084. X  - Any button restarts a paused game.
  1085. X
  1086. X  - Warning messages get displayed in the message box.
  1087. X
  1088. X  - getlogin() does not work in all cases.
  1089. X    It was replaced by getpwuid(getuid())->pw_name).
  1090. X
  1091. X  - For systems with smaller screens, XBoard can use smaller pieces,
  1092. X    and a smaller board.  -bigSizeMode False uses a smaller set of pieces.
  1093. X    These are scaled versions of the large pieces.  They look ok but could
  1094. X    be improved.
  1095. X
  1096. X  - -iconic doesn't work properly.  If XBoard is opened iconic then
  1097. X    iconifying it later with a keystroke doesn't work.  I think
  1098. X    this is an Xt bug.
  1099. X
  1100. X  - the remoteShell resource was added for HP-UX systems
  1101. X    and other systems where the remoteShell isn't rsh.
  1102. X
  1103. X  - older non-ANSI versions of Sun compilers complain vociferously.
  1104. X
  1105. X  - Roger Dubar, Konstantinos Konstantinides, Wolfgang S. Rupprecht,
  1106. X    Paul Scowen, Mvh Smidt and Kayvan Sylvan all helped immensely during
  1107. X    beta-testing.
  1108. X
  1109. Version 1.2 -- Tue Jun 11 17:14:12 PDT 1991
  1110. X
  1111. X  - Added a lex parser for algebraic games.  It should be easy to use the parser
  1112. X    for other interfaces such as the Microsoft Windows version.
  1113. X    It parses comments of the form [anything] and ! to the end of a line.
  1114. X
  1115. X  - Corrected the queening code.  XBoard was sending the wrong syntax.
  1116. X    It was sending for example h8(Q) when it should have been sending h8q.
  1117. X    Thanks to Paul Vaughan and Mike McGann for pointing this out.
  1118. X
  1119. X  - Moved the man page from xboard.1 to xboard.man.  This makes imake man page
  1120. X    installs work correctly.  Thanks to Richard K. Lloyd for pointing this out.
  1121. X
  1122. X  - Changed the forwards/backwards/readgamefile code to allow a play to step
  1123. X    back and forth in a game.  If he steps all the way to the beginning
  1124. X    he has to restart the game.  If he gets into a mated position, same problem.
  1125. X
  1126. X  - Modified the code to use the R4 routines rather than R3 compatibility.
  1127. X
  1128. X  - Added a PopUp dialog for getting file names.
  1129. X
  1130. X  - If the first character of the file is not `1' then the first line
  1131. X    of a game or position file is displayed as the name in a label widget.
  1132. X
  1133. X  - Minor hacks to work with R5 alpha.  Had to add an event handler to the
  1134. X    boardWidget to get translations to work.  This may go away with the real R5.
  1135. X    Added <Message>WM_PROTOCOLS: QuitProc() for R5 ICCCM compatibility.
  1136. X
  1137. X  - If the DisplayWidth or DisplayHeight is less than 800, use small size mode.
  1138. X    Also the size of the name widget was reduced from 500 pixels to 400 pixels
  1139. X    because in small size mode there was a gap on the right.
  1140. X    Changed the default font from fixed to helvetica_oblique14 to:
  1141. X        -*-helvetica-bold-r-normal--14-*-*-*-*-*-*-*
  1142. X    helvetica_oblique14 is a font alias not on all R4 systems.
  1143. X    Curiously enough, the 17 point is not available on 75dpi systems
  1144. X    and the 18 point font is not available on 100dpi systems.
  1145. X    Thanks to Richard K. Lloyd for pointing these out.
  1146. X
  1147. X  - Fixed a compiler warning for gcc and an error for the IBM RT compilers.
  1148. X    This is the VOID_PROC macro in xboard.h.  Thanks to David Jensen for this.
  1149. X
  1150. X  - -iconic doesn't work at all now.  The Iconify() does work.  This was
  1151. X    a tradeoff and it is really an Xt bug.
  1152. X
  1153. X  - fixed a problem with the new version of gnuchessr where xboard wasn't
  1154. X    getting gnuchessr error messages for illegal moves.  The problem seems
  1155. X    to be fixed *without* any gnuchess changes but this is likely to be
  1156. X    highly system dependant.  There should be a new line on line 246 of nondsp.c
  1157. X
  1158. X        printz ("Illegal move (no matching move generated)");
  1159. X
  1160. X    The xboard fix was to set non-blocking i/o on the read pipe for gnuchessr
  1161. X
  1162. X        fcntl(from_prog[0], F_SETFL, O_NDELAY);
  1163. X
  1164. X  - The bitmap file names were changed so that none exceeded 14 characters.
  1165. X    This is necessary for R5.
  1166. X
  1167. X  - Added the CHESSDIR environment variable.  Game and position files are
  1168. X    found in this directory.  If this variable is not declared, then the
  1169. X    current directory is used.  File names starting with / are treated
  1170. X    specially.
  1171. X
  1172. X  - Fixed a bug where saving a long game, resetting and saving a short game
  1173. X    resulted in appending the end of the long game to the short one.
  1174. X    If a game is just being played out and there is no reason for gnuchessr
  1175. X    to be used, ignore pipe signals.  This allows people to use xboard
  1176. X    as a chess board without need for gnuchess.  Also, trivially bad moves
  1177. X    such as e2e2 are not passed on to gnuchessr but instead ignored out of
  1178. X    hand.  This allows people using xboard as a chessboard with gnuchessr
  1179. X    to pick a piece up, think and put it back down without making a move.
  1180. X    Thanks to Jeff Kenton for pointing these out.
  1181. X
  1182. X  - Fixed a bug where the checkmate message wasn't being parsed and xboard
  1183. X    kept playing.  Also, the message was added to game file if saved.
  1184. X    Thanks to Scott Hemhill for pointing this out.
  1185. X
  1186. X  - enumerations are not really integers on some C compilers.  I added casting.
  1187. X    The new version of gnuchess expects the "go" command for two machine
  1188. X    and machine plays white cases.  The whiteString resource is for
  1189. X    compatibility with previous gnuchess versions which get confused by go.
  1190. X    Thanks to Martin D. for catching these.
  1191. X
  1192. X  - There was an off by one error with the clock resetting code.  Also,
  1193. X    the clock display highliting was wrong.  Thanks to Bill Shauck for
  1194. X    pointing these out.
  1195. X
  1196. X  - Changed the protocol that xboard uses to work with the new version of
  1197. X    gnuchessr.
  1198. X
  1199. X  - Turned off the easy mode.
  1200. X
  1201. X  - For version 1.2, Jeff Kenton, Richard LLoyd, David Jensen, Martin D.,
  1202. X    Bill Schmidt, Scott Hemphill, Paul Vaughan and Bill Shauck all found
  1203. X    a lot of bugs that we put into xboard just to see if they were paying
  1204. X    attention.  They were.
  1205. SHAR_EOF
  1206. chmod 0644 xboard/README ||
  1207. echo 'restore of xboard/README failed'
  1208. Wc_c="`wc -c < 'xboard/README'`"
  1209. test 10539 -eq "$Wc_c" ||
  1210.     echo 'xboard/README: original size 10539, current size' "$Wc_c"
  1211. rm -f _shar_wnt_.tmp
  1212. fi
  1213. # ============= xboard/Imakefile ==============
  1214. if test -f 'xboard/Imakefile' -a X"$1" != X"-c"; then
  1215.     echo 'x - skipping xboard/Imakefile (File already exists)'
  1216.     rm -f _shar_wnt_.tmp
  1217. else
  1218. > _shar_wnt_.tmp
  1219. echo 'x - extracting xboard/Imakefile (Text)'
  1220. sed 's/^X//' << 'SHAR_EOF' > 'xboard/Imakefile' &&
  1221. #
  1222. # Imakefile -- to generate a Makefile for xboard, use:
  1223. #   /usr/local/X11/mit/config/imake \
  1224. #       -I/usr/local/X11/mit/config \
  1225. #       -DTOPDIR=/usr/local/X11/mit
  1226. #
  1227. X
  1228. X   SYS_LIBRARIES = -lm
  1229. X LOCAL_LIBRARIES = XawClientLibs
  1230. X         DEPLIBS = XawClientDepLibs
  1231. X
  1232. SRCS = parser.c xboard.c
  1233. OBJS = parser.o xboard.o
  1234. X
  1235. AllTarget(xboard)
  1236. X
  1237. depend:: parser.c
  1238. X
  1239. clean::
  1240. X    $(RM) parser.c
  1241. X
  1242. ComplexProgramTarget(xboard)
  1243. SHAR_EOF
  1244. chmod 0644 xboard/Imakefile ||
  1245. echo 'restore of xboard/Imakefile failed'
  1246. Wc_c="`wc -c < 'xboard/Imakefile'`"
  1247. test 408 -eq "$Wc_c" ||
  1248.     echo 'xboard/Imakefile: original size 408, current size' "$Wc_c"
  1249. rm -f _shar_wnt_.tmp
  1250. fi
  1251. # ============= xboard/bitmaps/k_sm_ol.bm ==============
  1252. if test ! -d 'xboard/bitmaps'; then
  1253.     echo 'x - creating directory xboard/bitmaps'
  1254.     mkdir 'xboard/bitmaps'
  1255. fi
  1256. if test -f 'xboard/bitmaps/k_sm_ol.bm' -a X"$1" != X"-c"; then
  1257.     echo 'x - skipping xboard/bitmaps/k_sm_ol.bm (File already exists)'
  1258.     rm -f _shar_wnt_.tmp
  1259. else
  1260. > _shar_wnt_.tmp
  1261. echo 'x - extracting xboard/bitmaps/k_sm_ol.bm (Text)'
  1262. sed 's/^X//' << 'SHAR_EOF' > 'xboard/bitmaps/k_sm_ol.bm' &&
  1263. #define king_small_outline_width 64
  1264. #define king_small_outline_height 64
  1265. static char king_small_outline_bits[] = {
  1266. X 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x03,0x00,0x00,
  1267. X 0x00,0x01,0x00,0x00,0x60,0x0c,0x00,0x00,0x00,0x01,0x00,0x00,0x20,0x08,0x00,
  1268. X 0x00,0x00,0x01,0x00,0x00,0x20,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x60,0x0c,
  1269. X 0x00,0x00,0x00,0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x70,
  1270. X 0x1c,0x00,0x00,0x00,0x01,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x01,0xff,0x01,
  1271. X 0x18,0x30,0xc0,0xff,0x00,0x81,0x00,0x06,0x88,0x23,0x30,0x00,0x01,0x41,0x00,
  1272. X 0x1c,0x48,0x22,0x1c,0x00,0x02,0x21,0x00,0x30,0x48,0x20,0x04,0x00,0x04,0x11,
  1273. X 0x00,0x40,0xc8,0x22,0x02,0x38,0x08,0x19,0x0c,0x83,0x99,0xb3,0x81,0xc0,0x18,
  1274. X 0x09,0x02,0x0c,0x13,0x90,0x30,0x80,0x18,0x09,0x03,0x18,0x12,0xd0,0x18,0x80,
  1275. X 0x11,0x0d,0x01,0x10,0x94,0x53,0x00,0x00,0x31,0x85,0x00,0x20,0x7c,0x3e,0x04,
  1276. X 0x00,0x23,0x85,0x00,0x40,0x30,0x0c,0x04,0x00,0x22,0x85,0x00,0xc0,0x00,0x00,
  1277. X 0x02,0x1c,0x22,0xc1,0x38,0x80,0x00,0x01,0x41,0x1c,0x02,0x41,0x38,0x08,0x81,
  1278. X 0x83,0x41,0x1c,0x02,0x41,0x78,0x04,0x81,0x83,0x40,0x04,0x02,0x45,0x40,0x04,
  1279. X 0x02,0x41,0x40,0x02,0x22,0x45,0xc0,0x00,0x02,0x40,0x40,0x13,0x22,0x45,0x88,
  1280. X 0x00,0x00,0x00,0x40,0x0f,0x23,0x45,0xb8,0x01,0x04,0x00,0xc0,0x05,0x21,0x05,
  1281. X 0xe0,0x03,0x04,0x21,0xc0,0x03,0x21,0x89,0x80,0x03,0x8c,0x23,0xc0,0x01,0x31,
  1282. X 0x89,0x00,0x02,0x88,0x23,0xc0,0x80,0x11,0x89,0x01,0x02,0x08,0x21,0x40,0x80,
  1283. X 0x10,0x09,0x01,0x04,0x18,0x10,0x20,0x80,0x18,0x19,0x03,0x0c,0x10,0x10,0x20,
  1284. X 0x80,0x18,0x11,0x02,0x08,0x10,0x10,0x30,0x80,0x08,0x11,0x02,0x08,0x10,0x10,
  1285. X 0x10,0x40,0x08,0x21,0x04,0x18,0x00,0x09,0x10,0x40,0x04,0x21,0x04,0x10,0x20,
  1286. X 0x09,0x18,0x00,0x04,0x41,0x0c,0x30,0x20,0x08,0x08,0x20,0x02,0x41,0x08,0x20,
  1287. X 0x20,0x08,0x04,0x30,0x03,0x81,0x10,0x20,0x20,0x08,0x00,0x08,0x01,0x81,0x30,
  1288. X 0x00,0x20,0x08,0x00,0x8c,0x01,0x01,0x21,0x00,0x20,0x08,0x00,0xc4,0x00,0x01,
  1289. X 0x02,0xf8,0x3f,0xf8,0x1f,0x42,0x00,0x01,0xc4,0x0f,0x00,0x00,0xf0,0x23,0x00,
  1290. X 0x01,0x00,0x00,0x11,0x11,0x01,0x10,0x00,0x01,0x10,0x10,0x11,0x11,0x11,0x08,
  1291. X 0x00,0x01,0xa0,0x11,0x00,0x00,0x90,0x01,0x00,0x01,0x00,0x01,0xfe,0xff,0x00,
  1292. X 0x05,0x00,0x01,0x00,0xf0,0x03,0x00,0x1f,0x04,0x00,0x01,0x00,0x00,0xc0,0x07,
  1293. X 0x00,0x00,0x00,0x01,0x80,0x03,0xf0,0x0f,0xc0,0x01,0x00,0x01,0x80,0x07,0xc0,
  1294. X 0x07,0xe0,0x01,0x00,0x01,0x80,0x0f,0x00,0x01,0xf0,0x01,0x00,0x01,0x80,0x03,
  1295. X 0xfc,0xff,0xc0,0x01,0x00,0x01,0x00,0xe0,0x07,0x80,0x1f,0x00,0x00,0x01,0x00,
  1296. X 0x3f,0x00,0x00,0xf0,0x00,0x00,0x01,0x40,0x00,0x00,0x00,0x00,0x02,0x00,0x01,
  1297. X 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1298. X 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
  1299. X 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
  1300. X 0x00,0x00};
  1301. SHAR_EOF
  1302. chmod 0644 xboard/bitmaps/k_sm_ol.bm ||
  1303. echo 'restore of xboard/bitmaps/k_sm_ol.bm failed'
  1304. Wc_c="`wc -c < 'xboard/bitmaps/k_sm_ol.bm'`"
  1305. test 2746 -eq "$Wc_c" ||
  1306.     echo 'xboard/bitmaps/k_sm_ol.bm: original size 2746, current size' "$Wc_c"
  1307. rm -f _shar_wnt_.tmp
  1308. fi
  1309. # ============= xboard/bitmaps/ol_p.bm ==============
  1310. if test -f 'xboard/bitmaps/ol_p.bm' -a X"$1" != X"-c"; then
  1311.     echo 'x - skipping xboard/bitmaps/ol_p.bm (File already exists)'
  1312.     rm -f _shar_wnt_.tmp
  1313. else
  1314. > _shar_wnt_.tmp
  1315. echo 'x - extracting xboard/bitmaps/ol_p.bm (Text)'
  1316. sed 's/^X//' << 'SHAR_EOF' > 'xboard/bitmaps/ol_p.bm' &&
  1317. #define outline_pawn_width 80
  1318. #define outline_pawn_height 80
  1319. static char outline_pawn_bits[] = {
  1320. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1321. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1322. X   0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x70,
  1323. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00,
  1324. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00,
  1325. X   0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
  1326. X   0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1327. X   0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
  1328. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x00,
  1329. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00,
  1330. X   0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1331. X   0x00, 0x00, 0xe0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1332. X   0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff,
  1333. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00,
  1334. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x00, 0x00,
  1335. X   0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
  1336. X   0x00, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
  1337. X   0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
  1338. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
  1339. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
  1340. X   0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
  1341. X   0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1342. X   0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
  1343. X   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
  1344. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
  1345. X   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1346. X   0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1347. X   0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,
  1348. X   0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x20, 0x00,
  1349. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
  1350. X   0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
  1351. X   0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
  1352. X   0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
  1353. X   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
  1354. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
  1355. X   0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
  1356. X   0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
  1357. X   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
  1358. X   0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
  1359. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
  1360. X   0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
  1361. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
  1362. X   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
  1363. X   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x80, 0x00,
  1364. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
  1365. X   0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
  1366. X   0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
  1367. X   0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
  1368. X   0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00,
  1369. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00,
  1370. X   0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
  1371. X   0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1372. X   0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
  1373. X   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xff, 0x00,
  1374. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x78, 0xc0, 0x81, 0x07, 0x00, 0x00,
  1375. X   0x00, 0x00, 0x00, 0x07, 0xc0, 0x7f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
  1376. X   0x80, 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00,
  1377. X   0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
  1378. X   0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
  1379. X   0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
  1380. X   0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
  1381. X   0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00,
  1382. X   0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
  1383. X   0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
  1384. X   0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
  1385. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1386. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  1387. SHAR_EOF
  1388. chmod 0644 xboard/bitmaps/ol_p.bm ||
  1389. echo 'restore of xboard/bitmaps/ol_p.bm failed'
  1390. Wc_c="`wc -c < 'xboard/bitmaps/ol_p.bm'`"
  1391. test 5099 -eq "$Wc_c" ||
  1392.     echo 'xboard/bitmaps/ol_p.bm: original size 5099, current size' "$Wc_c"
  1393. rm -f _shar_wnt_.tmp
  1394. fi
  1395. # ============= xboard/bitmaps/ol_q.bm ==============
  1396. if test -f 'xboard/bitmaps/ol_q.bm' -a X"$1" != X"-c"; then
  1397.     echo 'x - skipping xboard/bitmaps/ol_q.bm (File already exists)'
  1398.     rm -f _shar_wnt_.tmp
  1399. else
  1400. > _shar_wnt_.tmp
  1401. echo 'x - extracting xboard/bitmaps/ol_q.bm (Text)'
  1402. sed 's/^X//' << 'SHAR_EOF' > 'xboard/bitmaps/ol_q.bm' &&
  1403. #define outline_queen_width 80
  1404. #define outline_queen_height 80
  1405. static char outline_queen_bits[] = {
  1406. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1407. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1408. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01,
  1409. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00,
  1410. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
  1411. X   0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1412. X   0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1413. X   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x80, 0x01,
  1414. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x80, 0x01, 0x00, 0x07,
  1415. X   0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x80, 0x01, 0x80, 0x0d, 0x00, 0x00,
  1416. X   0x00, 0x00, 0xb0, 0x01, 0xc0, 0x03, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
  1417. X   0xe0, 0x00, 0x40, 0x02, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
  1418. X   0x40, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x02,
  1419. X   0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x02, 0x00, 0x03,
  1420. X   0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x02, 0x00, 0x03, 0x00, 0x00,
  1421. X   0x00, 0x00, 0xc0, 0x01, 0x40, 0x02, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00,
  1422. X   0x40, 0x01, 0x40, 0x02, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01,
  1423. X   0x60, 0x06, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x20, 0x04,
  1424. X   0xc0, 0x02, 0x00, 0x00, 0x1c, 0x00, 0x40, 0x02, 0x20, 0x04, 0x40, 0x02,
  1425. X   0x00, 0x00, 0x36, 0x00, 0x40, 0x02, 0x20, 0x04, 0x40, 0x02, 0x00, 0x0e,
  1426. X   0x22, 0x00, 0x40, 0x06, 0x20, 0x04, 0x60, 0x02, 0x00, 0x1b, 0x36, 0x00,
  1427. X   0x40, 0x04, 0x20, 0x04, 0x20, 0x02, 0x00, 0x11, 0x3c, 0x00, 0x40, 0x04,
  1428. X   0x20, 0x04, 0x20, 0x02, 0x00, 0x1b, 0x70, 0x00, 0x40, 0x0c, 0x20, 0x04,
  1429. X   0x30, 0x02, 0x00, 0x0e, 0x60, 0x00, 0x40, 0x08, 0x20, 0x04, 0x10, 0x02,
  1430. X   0x00, 0x03, 0xe0, 0x00, 0x40, 0x08, 0x30, 0x0c, 0x10, 0x02, 0x80, 0x03,
  1431. X   0xc0, 0x01, 0x40, 0x18, 0x10, 0x08, 0x18, 0x02, 0x80, 0x01, 0x40, 0x01,
  1432. X   0x40, 0x10, 0x10, 0x08, 0x08, 0x02, 0xc0, 0x01, 0x40, 0x03, 0x40, 0x10,
  1433. X   0x10, 0x08, 0x08, 0x02, 0x60, 0x01, 0x40, 0x06, 0x40, 0x10, 0x10, 0x08,
  1434. X   0x08, 0x02, 0x20, 0x01, 0x40, 0x04, 0x40, 0x30, 0x10, 0x08, 0x0c, 0x02,
  1435. X   0x30, 0x01, 0xc0, 0x0c, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x18, 0x01,
  1436. X   0x80, 0x18, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x08, 0x01, 0x80, 0x10,
  1437. SHAR_EOF
  1438. true || echo 'restore of xboard/bitmaps/ol_q.bm failed'
  1439. fi
  1440. echo 'End of  part 3'
  1441. echo 'File xboard/bitmaps/ol_q.bm is continued in part 4'
  1442. echo 4 > _shar_seq_.tmp
  1443. exit 0
  1444.  
  1445. --
  1446. Dan Heller
  1447. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  1448. Senior Writer                President          comp-sources-x@uunet.uu.net
  1449. argv@ora.com                 argv@zipcode.com
  1450.