home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume41 / ldb / patch02 next >
Encoding:
Text File  |  1993-12-19  |  24.2 KB  |  710 lines

  1. Newsgroups: comp.sources.misc
  2. From: perry@truk.aap.com (Perry R. Ross)
  3. Subject: v41i046:  ldb - Play backgammon by e-mail, v1.3, Patch02
  4. Message-ID: <1993Dec19.212253.1320@sparky.sterling.com>
  5. X-Md4-Signature: efeaa7b57f7571fb4a7c626ca7d58ff4
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Sun, 19 Dec 1993 21:22:53 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: perry@truk.aap.com (Perry R. Ross)
  12. Posting-number: Volume 41, Issue 46
  13. Archive-name: ldb/patch02
  14. Environment: UNIX, C, VMS, VAXC, CURSES, 32BIT
  15. Patch-To: ldb: Volume 36, Issue 98-109
  16.  
  17.         Long Distance Backgammon
  18.  
  19.     This is a program that lets two people easily play backgammon
  20. by e-mail.  It currently runs only on character-oriented terminals
  21. (or emulators thereof) under the curses package.  It runs on most
  22. flavors of UNIX, as well as VMS version 5.0 and above.
  23.  
  24.     This is patch 2 to version 1.3 of ldb.  The Crawford rule has
  25. been (re) fixed, hopefully for the last time.  You will now get
  26. a warning if you play a Crawford rule game with a version of
  27. ldb before this one.  Other bugs have been fixed, most reported
  28. by Peter Nickless.  Thanks for all suggestions/bug reports
  29. received, and apologies to those that couldn't be fixed yet.
  30. See the comments at the top of main.c for a complete list of bugs
  31. fixed by this patch, and TODO for a list of bugs/enhancements
  32. yet to fix.
  33.  
  34.     If you don't know how to apply this patch, and just want
  35. to get the most current ldb, feel free to e-mail me and I'll
  36. send it to you.
  37.  
  38. Perry R. Ross -- perry@aap.com
  39.  
  40.  
  41. *** 131src/README    Fri Dec 10 16:29:53 1993
  42. --- README    Fri Dec 10 16:45:19 1993
  43. ***************
  44. *** 13,19 ****
  45.   
  46.       Suggestions and problems are cheerfully accepted, all the more
  47.   so when accompanied by appropriate patches, in any format the patch
  48. ! program understands (e.g. context diff).  E-mail to ross@emf780.den.mmc.com.
  49.   
  50.       This file is for version 1.3 of ldb.  For those upgrading from
  51.   1.0 who are wondering what happened to 1.1, it was only released on
  52. --- 13,19 ----
  53.   
  54.       Suggestions and problems are cheerfully accepted, all the more
  55.   so when accompanied by appropriate patches, in any format the patch
  56. ! program understands (e.g. context diff).  E-mail to perry@aap.com.
  57.   
  58.       This file is for version 1.3 of ldb.  For those upgrading from
  59.   1.0 who are wondering what happened to 1.1, it was only released on
  60. *** 131src/TODO    Fri Dec 10 16:35:26 1993
  61. --- TODO    Wed Dec 15 11:18:34 1993
  62. ***************
  63. *** 1,5 ****
  64. --- 1,13 ----
  65.   flist_unix does not work on SCO UNIX.
  66.   
  67. + From Peter Nickless (nickless@ccs.carleton.ca)
  68. + Reported a bug in scoring when a double is declined.  Symptoms
  69. + are: neutral cube, double is declined, then game value is doubled
  70. + and cube is moved to player's board.  Could not reproduce this bug.
  71. + Anyone experiencing it should send me: .ldbdata, .oldldbdata, .ldbpeople,
  72. + and if possible the few most recent moves from your and your opponents'
  73. + mailbox.
  74.   From Dick King (king@ukulele.reasoning.com):
  75.   1. Proposition support.  Need more info.
  76.   2. Dice server to support secure games.  For games that need
  77. ***************
  78. *** 9,20 ****
  79.   Each time you request a roll from the server, you send your opponent's
  80.   last roll for verification.
  81.   
  82. - Patch to FeFinishSession for Linux: add nl() after refresh().
  83. - Maybe add nocbreak() and echo() too just to be safe?
  84. - Found by Stephan G. Dasia (stephand@solist.htsa.aha.nl)
  85. - Include earle's modified makefile, etc.
  86.   way of showing all opponent pieces that you could hit.
  87.   way of showing all points you could make.
  88.   
  89. --- 17,22 ----
  90. ***************
  91. *** 59,65 ****
  92.   
  93.   Socket transport.
  94.   
  95. ! Motif front-end.  Open Look?  Xlib?
  96.   
  97.   VMS command line interface.  Maybe, separate out all host-specific
  98.   stuff into a separate file, & only compile in the one you need.
  99. --- 61,69 ----
  100.   
  101.   Socket transport.
  102.   
  103. ! Motif front-end.  Xlib?  Athena?  Mac?
  104. ! Make 16-bit clean & port to pc.
  105.   
  106.   VMS command line interface.  Maybe, separate out all host-specific
  107.   stuff into a separate file, & only compile in the one you need.
  108. *** 131src/fe_curses.c    Fri Dec 10 16:30:14 1993
  109. --- fe_curses.c    Mon Dec 13 09:29:27 1993
  110. ***************
  111. *** 105,110 ****
  112. --- 105,113 ----
  113.   if (FeIsActive) {
  114.       clear();
  115.       refresh();
  116. +     nl();
  117. +     nocbreak();
  118. +     echo();
  119.       endwin();
  120.       FeIsActive = 0;
  121.       Current_Game = NULL;
  122. ***************
  123. *** 303,309 ****
  124.   FeStatusLine(tmp);
  125.   FeMessage(g->dispmsg);        /* put message (if any) on message line */
  126.   if (g->dispmsg != NULL) {    /* if there was a message, it has been */
  127. !     free(g->dispmsg);    /* displayed, so it can thrown away */
  128.       g->dispmsg = NULL;
  129.       }
  130.   refresh();
  131. --- 306,312 ----
  132.   FeStatusLine(tmp);
  133.   FeMessage(g->dispmsg);        /* put message (if any) on message line */
  134.   if (g->dispmsg != NULL) {    /* if there was a message, it has been */
  135. !     free(g->dispmsg);    /* displayed, so it can be thrown away */
  136.       g->dispmsg = NULL;
  137.       }
  138.   refresh();
  139. *** 131src/game.c    Fri Dec 10 16:30:05 1993
  140. --- game.c    Thu Dec  9 09:34:14 1993
  141. ***************
  142. *** 526,535 ****
  143.   struct game *g;
  144.   int rsflag;                /* 1 = restart game if necessary */
  145.   {
  146.   
  147.   if (g->ppl->fence < g->starttime)   /* if newer than fence */
  148.       g->ppl->fence = g->starttime;    /* move up fence */
  149. ! if (rsflag && (g->flags & F_PERM) && (g->mcurrent[WHO_OPP] >= g->mtotal) ) {
  150.       message("Restarted game with %s (%s).\n",g->opname,g->opaddr);
  151.       notify = NULL;
  152.       startgame(g->opaddr,g->mydir,g->mycolor,g->opcolor,
  153. --- 526,537 ----
  154.   struct game *g;
  155.   int rsflag;                /* 1 = restart game if necessary */
  156.   {
  157. + int match_over =
  158. +     (g->mcurrent[WHO_ME] >= g->mtotal)||(g->mcurrent[WHO_OPP] >= g->mtotal);
  159.   
  160.   if (g->ppl->fence < g->starttime)   /* if newer than fence */
  161.       g->ppl->fence = g->starttime;    /* move up fence */
  162. ! if (rsflag && (g->flags & F_PERM) && match_over) {
  163.       message("Restarted game with %s (%s).\n",g->opname,g->opaddr);
  164.       notify = NULL;
  165.       startgame(g->opaddr,g->mydir,g->mycolor,g->opcolor,
  166. ***************
  167. *** 536,541 ****
  168.          g->flags & (F_JACOBY|F_CRAWFORD|F_PERM|F_EUROPE|F_INVERT),
  169.          g->mtotal,0);
  170.       }
  171. ! if ( (g->notify != NULL) && (g->mcurrent[WHO_OPP] >= g->mtotal) )
  172.       sendpkt(g,NOTIFY);
  173.   }
  174. --- 538,543 ----
  175.          g->flags & (F_JACOBY|F_CRAWFORD|F_PERM|F_EUROPE|F_INVERT),
  176.          g->mtotal,0);
  177.       }
  178. ! if ( (g->notify != NULL) && match_over )
  179.       sendpkt(g,NOTIFY);
  180.   }
  181. *** 131src/ldb.h    Fri Dec 10 16:35:26 1993
  182. --- ldb.h    Mon Dec 13 09:13:09 1993
  183. ***************
  184. *** 171,177 ****
  185.   #define F_CRDONE    1024    /* The crawford rule game has been played */
  186.   
  187.           /* field types for reading name/value files */
  188. ! #define FT_CHAR        1    /* store a single char (may not be signed!) */
  189.   #define FT_INT        2    /* store a single integer */
  190.   #define FT_STRING    3    /* store a char * (use save()) */
  191.   #define FT_MOVE        4    /* a struct mv */
  192. --- 171,177 ----
  193.   #define F_CRDONE    1024    /* The crawford rule game has been played */
  194.   
  195.           /* field types for reading name/value files */
  196. ! #define FT_CHAR        1    /* store a char (must be in [0..127] for portability)*/
  197.   #define FT_INT        2    /* store a single integer */
  198.   #define FT_STRING    3    /* store a char * (use save()) */
  199.   #define FT_MOVE        4    /* a struct mv */
  200. *** 131src/lock.c    Fri Dec 10 16:29:56 1993
  201. --- lock.c    Thu Dec  9 12:21:43 1993
  202. ***************
  203. *** 27,34 ****
  204.    *
  205.    * This uses the O_EXCL flag to open, which as far as I know is
  206.    * supported on all UNIX flavors.  If it isn't on yours:
  207. !  *    a. Please mail me at ross@emf780.den.mmc.com and tell me
  208. !  *       what your system is.
  209.    *    b. try replacing open(fn,O_...,0644) with creat(fn,0444).
  210.    *----------------------------------------------------------------------
  211.    */
  212. --- 27,34 ----
  213.    *
  214.    * This uses the O_EXCL flag to open, which as far as I know is
  215.    * supported on all UNIX flavors.  If it isn't on yours:
  216. !  *    a. Please mail me at the address in patchlevel.h for AUTHOR_EMAIL
  217. !  *       and tell me what your system is.
  218.    *    b. try replacing open(fn,O_...,0644) with creat(fn,0444).
  219.    *----------------------------------------------------------------------
  220.    */
  221. *** 131src/main.c    Fri Dec 10 16:35:27 1993
  222. --- main.c    Wed Dec 15 11:04:15 1993
  223. ***************
  224. *** 76,83 ****
  225.    *            only count as 1 when neither player doubled during
  226.    *            the game.
  227.    *    -crawford    Enables the crawford rule for any games subsequently
  228. !  *            started.  This rule prevents doubling when either
  229. !  *            player is within 1 point of winning the match.
  230.    *    -european    Enables european scoring for any subsequently
  231.    *            created games.  This rule makes backgammons count
  232.    *            as double games, rather than triple.
  233. --- 76,84 ----
  234.    *            only count as 1 when neither player doubled during
  235.    *            the game.
  236.    *    -crawford    Enables the crawford rule for any games subsequently
  237. !  *            started.  This rule prevents doubling for one game
  238. !  *            when either player is within 1 point of winning
  239. !  *            the match.
  240.    *    -european    Enables european scoring for any subsequently
  241.    *            created games.  This rule makes backgammons count
  242.    *            as double games, rather than triple.
  243. ***************
  244. *** 397,402 ****
  245. --- 398,418 ----
  246.    * 3.    The Makefile was changed to do a full recompile if ldb.h is changed.
  247.    *    This was done by adding a homebrew "make depend", which should be run
  248.    *    before each release is packed so the users don't have to.
  249. +  *** Version 01   Rev 3   Patch 2
  250. +  * 1.    A bug was fixed where conceded permanent games that finish a match
  251. +  *    are not restarted or notified.
  252. +  * 2.    A bug was fixed that would cause there to be two crawford games
  253. +  *    instead of just one.  The warning mentioned above in version 1.3.0
  254. +  *    item 1 has been updated to warn for any pre-1.3.2 version.
  255. +  *    Sorry 'bout that.
  256. +  * 3.    Attempting to double after rolling now prints a more
  257. +  *    understandable message.
  258. +  * 4.    Autoroll now works during the crawford game also.
  259. +  * 5.    Concede will refuse to work if there are used rolls.  This prevents
  260. +  *    a disagreement on how to score the concede.
  261. +  * 6.    Autodoubles are disabled during the Crawford Rule game.
  262. +  * 7.    FeFinishSession does nl(), nocbreak(), and echo() before calling
  263. +  *    endwin().  This works around a Linux bug.  Found by Stephan G. Dasia.
  264.    *============================================================================
  265.    */
  266.   
  267. *** 131src/misc.c    Fri Dec 10 16:30:07 1993
  268. --- misc.c    Thu Dec  9 09:33:33 1993
  269. ***************
  270. *** 605,620 ****
  271.    * F_CRGAME is set if this is the crawford rule game for the match.
  272.    * F_CRDONE is set after the crawford rule game has been played.
  273.    *
  274. !  * F_CRGAME is set if:
  275. !  *    F_CRAWFORD is set    AND
  276. !  *    F_CRDONE is not set    AND
  277. !  *    a player is within one point of winning the match.
  278. !  * otherwise F_CRGAME is cleared.
  279. !  *
  280. !  * F_CRDONE is set if:
  281. !  *    F_CRAWFORD is set    AND
  282. !  *    F_CRGAME was set (before the above)
  283. !  * otherwise F_CRDONE is not changed.
  284.    *----------------------------------------------------------------------
  285.    */
  286.   
  287. --- 605,612 ----
  288.    * F_CRGAME is set if this is the crawford rule game for the match.
  289.    * F_CRDONE is set after the crawford rule game has been played.
  290.    *
  291. !  * crawford_check should be called every time a match game is started,
  292. !  * except for the first game of the match.
  293.    *----------------------------------------------------------------------
  294.    */
  295.   
  296. ***************
  297. *** 621,635 ****
  298.   crawford_check(g)
  299.   struct game *g;
  300.   {
  301. - int old_crgame;
  302.   
  303. ! old_crgame = g->flags & F_CRGAME;        /* save F_CRGAME */
  304. ! if ( ((g->flags & (F_CRAWFORD|F_CRDONE)) == F_CRAWFORD) &&
  305. !      ( (g->mcurrent[WHO_ME] == g->mtotal-1) ||
  306. !        (g->mcurrent[WHO_OPP] == g->mtotal-1) ) )
  307. !     g->flags |= F_CRGAME;        /* this is the crawford rule game */
  308. ! else
  309. !     g->flags &= ~F_CRGAME;        /* not the crawford game, clear flag */
  310. ! if ( (g->flags & F_CRAWFORD) && old_crgame)
  311. !     g->flags |= F_CRDONE;        /* crawford rule game is over */
  312.   }
  313. --- 613,637 ----
  314.   crawford_check(g)
  315.   struct game *g;
  316.   {
  317.   
  318. !     /* if the crawford rule is not in effect, or if the crawford    */
  319. !     /* game has already been played, clear F_CRGAME and return.    */
  320. ! if ( ((g->flags & F_CRAWFORD) == 0) || (g->flags & F_CRDONE) ) {
  321. !     g->flags &= ~F_CRGAME;        /* this is not crawford game */
  322. !     return;
  323. !     }
  324. !     /* we just finished the crawford game, set CRDONE and return.    */
  325. ! if (g->flags & F_CRGAME) {
  326. !     g->flags = (g->flags & ~F_CRGAME) | F_CRDONE;
  327. !     return;
  328. !     }
  329. !     /* if either player is within one point of match total, then    */
  330. !     /* this is the crawford game.  Set CRGAME and return.        */
  331. ! if ((g->mcurrent[WHO_ME]==g->mtotal-1)||(g->mcurrent[WHO_OPP]==g->mtotal-1))
  332. !     g->flags |= F_CRGAME;
  333.   }
  334. *** 131src/patchlevel.h    Fri Dec 10 16:35:28 1993
  335. --- patchlevel.h    Thu Dec  9 09:35:57 1993
  336. ***************
  337. *** 36,40 ****
  338.   
  339.   #define VERSION        1
  340.   #define REVISION    3        /* no more than 9 */
  341. ! #define PATCHLEVEL    1        /* no more than 9 */
  342.   #define AUTHOR_EMAIL    "perry@aap.com"
  343. --- 36,40 ----
  344.   
  345.   #define VERSION        1
  346.   #define REVISION    3        /* no more than 9 */
  347. ! #define PATCHLEVEL    2        /* no more than 9 */
  348.   #define AUTHOR_EMAIL    "perry@aap.com"
  349. *** 131src/process.c    Fri Dec 10 16:30:06 1993
  350. --- process.c    Thu Dec  9 13:31:42 1993
  351. ***************
  352. *** 47,65 ****
  353.   FeDrawGame(g);            /* draw the game */
  354.   switch (g->state) {
  355.   case ST_MYTURN:            /* my turn, I haven't rolled yet */
  356. !     if ( ((g->flags & F_IDOUBLED) == 0) || (*rc.autoroll == 'n') ) {
  357.           i = myturn(g);    /* I didn't double last */
  358.           break;
  359.           }
  360. !     rolldice(g);        /* if I doubled last, go ahead and roll */
  361. !     g->state = ST_MYMOVE;    /* skip this state completely */
  362. !     if (*rc.chkpt == 'y') {    /* checkpoint games */
  363. !         writegames(rc.gfile,rc.gbackup,rc.pfile);
  364. !         rc.gbackup = NULL;    /* only backup old file once */
  365. !         }
  366. !     for (i = 0; i < 4; i++)        /* draw my new roll */
  367. !         FeDrawMove(g,WHO_ME,i);
  368. !     /**** fall through ****/
  369.   case ST_MYMOVE:            /* my turn, I have rolled */
  370.       i = mymove(g);        /* user has rolled, must move */
  371.       break;
  372. --- 47,68 ----
  373.   FeDrawGame(g);            /* draw the game */
  374.   switch (g->state) {
  375.   case ST_MYTURN:            /* my turn, I haven't rolled yet */
  376. !     if ( (*rc.autoroll == 'y') && (g->flags & (F_IDOUBLED|F_CRGAME)) ) {
  377. !         g->curbd = BD_CUR;
  378. !         rolldice(g);    /* if crawford game or I doubled last, roll */
  379. !         g->state = ST_MYMOVE;    /* skip this state completely */
  380. !         if (*rc.chkpt == 'y') {    /* checkpoint games */
  381. !             writegames(rc.gfile,rc.gbackup,rc.pfile);
  382. !             rc.gbackup = NULL;    /* only backup old file once */
  383. !             }
  384. !         for (i = 0; i < 4; i++)        /* draw my new roll */
  385. !             FeDrawMove(g,WHO_ME,i);
  386. !         }
  387. !     else {
  388.           i = myturn(g);    /* I didn't double last */
  389.           break;
  390.           }
  391. !     /*** fall through ***/
  392.   case ST_MYMOVE:            /* my turn, I have rolled */
  393.       i = mymove(g);        /* user has rolled, must move */
  394.       break;
  395. ***************
  396. *** 122,128 ****
  397.               break;
  398.               }
  399.           if (FeGetComment(g) < 0) {    /* get message */
  400. !             FeMessage("Double aborted.");
  401.               break;        /* changed his mind */
  402.               }
  403.           g->state = ST_OPACCEPT;    /* we are waiting for accept/decline */
  404. --- 125,131 ----
  405.               break;
  406.               }
  407.           if (FeGetComment(g) < 0) {    /* get message */
  408. !             FeMessage("Double cancelled.");
  409.               break;        /* changed his mind */
  410.               }
  411.           g->state = ST_OPACCEPT;    /* we are waiting for accept/decline */
  412. ***************
  413. *** 129,137 ****
  414.           sendpkt(g,OFRDBL);    /* send the double packet */
  415.           return(0);        /* this game is done for now */
  416.       case 'C':            /* I'm wimping out */
  417. !         if ( (check_concede(g) == 0) || (FeGetComment(g) < 0) ) {
  418. !             FeMessage("Concede aborted.");
  419.               break;
  420.               }
  421.           ilose(g,T_ICONCEDE,0);    /* this game is over */
  422.           sendpkt(g,CONCEDE);    /* send the packet */
  423. --- 132,142 ----
  424.           sendpkt(g,OFRDBL);    /* send the double packet */
  425.           return(0);        /* this game is done for now */
  426.       case 'C':            /* I'm wimping out */
  427. !         if (check_concede(g) == 0)
  428.               break;
  429. +         if (FeGetComment(g) < 0) {
  430. +             FeMessage("Concede cancelled.");
  431. +             break;
  432.               }
  433.           ilose(g,T_ICONCEDE,0);    /* this game is over */
  434.           sendpkt(g,CONCEDE);    /* send the packet */
  435. ***************
  436. *** 156,161 ****
  437. --- 161,168 ----
  438.    * It also allows the user to cycle through the three board displays,
  439.    * to concede, and to go to the next game.
  440.    * Since the user has already rolled, doubling is not allowed here.
  441. +  *
  442. +  * Concede is disabled unless all rolls are unused.
  443.    *----------------------------------------------------------------------
  444.    */
  445.   
  446. ***************
  447. *** 167,173 ****
  448.   static char used[] = "That move is already used -- use Reset to start over";
  449.   struct mv tmp;
  450.   static char *m[] = {"Reset","Send","Board","Next Game","Concede",
  451. !             "Point","Off","Quit",NULL};
  452.   char pm = '\0';
  453.   int lastpt = 99;        /* point last move started from */
  454.   int lastd = 99;            /* point last move ended at */
  455. --- 174,180 ----
  456.   static char used[] = "That move is already used -- use Reset to start over";
  457.   struct mv tmp;
  458.   static char *m[] = {"Reset","Send","Board","Next Game","Concede",
  459. !             "Point","Off","Double","Quit",NULL};
  460.   char pm = '\0';
  461.   int lastpt = 99;        /* point last move started from */
  462.   int lastd = 99;            /* point last move ended at */
  463. ***************
  464. *** 182,188 ****
  465.           if (checkused(g))    /* didn't use all our moves */
  466.               break;
  467.           if (FeGetComment(g) < 0) {    /* get our comment */
  468. !             FeMessage("Send aborted.");
  469.               break;
  470.               }
  471.           if (g->board[OFFPT(g->mydir)].qty == 15)    /* I win */
  472. --- 189,195 ----
  473.           if (checkused(g))    /* didn't use all our moves */
  474.               break;
  475.           if (FeGetComment(g) < 0) {    /* get our comment */
  476. !             FeMessage("Send cancelled.");
  477.               break;
  478.               }
  479.           if (g->board[OFFPT(g->mydir)].qty == 15)    /* I win */
  480. ***************
  481. *** 208,216 ****
  482.               g->curbd = BD_BEFOP;    /* wrap around */
  483.           return(1);        /* redraw & call us again */
  484.       case 'C':            /* I'm wimping out */
  485. !         if ( (check_concede(g) == 0) || (FeGetComment(g) < 0) ) {
  486. !             FeMessage("Concede aborted.");
  487.               break;
  488.               }
  489.           ilose(g,T_ICONCEDE,0);
  490.           sendpkt(g,CONCEDE);    /* send the packet */
  491. --- 215,225 ----
  492.               g->curbd = BD_BEFOP;    /* wrap around */
  493.           return(1);        /* redraw & call us again */
  494.       case 'C':            /* I'm wimping out */
  495. !         if (check_concede(g) == 0)
  496.               break;
  497. +         if (FeGetComment(g) < 0) {
  498. +             FeMessage("Concede cancelled.");
  499. +             break;
  500.               }
  501.           ilose(g,T_ICONCEDE,0);
  502.           sendpkt(g,CONCEDE);    /* send the packet */
  503. ***************
  504. *** 405,410 ****
  505. --- 414,422 ----
  506.           FeDrawMove(g,WHO_ME,i);
  507.           FeCheckContact(g);
  508.           break;
  509. +     case 'D':            /* can't double now */
  510. +         FeMessage("You can't double after rolling.");
  511. +         break;
  512.       default:
  513.           FeMessage("Invalid command.");
  514.           break;
  515. ***************
  516. *** 440,446 ****
  517.       switch (c) {
  518.       case 'A':                /* I accepted */
  519.           if (FeGetComment(g) < 0) {        /* get message */
  520. !             FeMessage("Accept aborted.");
  521.               break;
  522.               }
  523.           g->gameval *= 2;        /* the game value is doubled */
  524. --- 452,458 ----
  525.       switch (c) {
  526.       case 'A':                /* I accepted */
  527.           if (FeGetComment(g) < 0) {        /* get message */
  528. !             FeMessage("Accept cancelled.");
  529.               break;
  530.               }
  531.           g->gameval *= 2;        /* the game value is doubled */
  532. ***************
  533. *** 449,455 ****
  534.           return(0);            /* done w/ this game for now */
  535.       case 'D':                /* I declined */
  536.           if (FeGetComment(g) < 0) {        /* get message */
  537. !             FeMessage("Decline aborted.");
  538.               break;
  539.               }
  540.           ilose(g,T_IDECLINE,0);
  541. --- 461,467 ----
  542.           return(0);            /* done w/ this game for now */
  543.       case 'D':                /* I declined */
  544.           if (FeGetComment(g) < 0) {        /* get message */
  545. !             FeMessage("Decline cancelled.");
  546.               break;
  547.               }
  548.           ilose(g,T_IDECLINE,0);
  549. ***************
  550. *** 567,572 ****
  551. --- 579,590 ----
  552.   int gv, bg;
  553.   char *msg;
  554.   
  555. + for (gv = 0; gv < 4; gv++)
  556. +     if ( (g->mvs[gv].roll > 0) && (g->mvs[gv].pt >= 0) ) {
  557. +         FeMessage(
  558. +         "You can't concede with used rolls -- use Reset first.");
  559. +         return(0);
  560. +         }
  561.   g->term = T_ICONCEDE;
  562.   bg = gvalue(g,&gv);
  563.   switch (bg) {
  564. ***************
  565. *** 580,584 ****
  566.       msg = "Are you sure? [yn]";
  567.       break;
  568.       }
  569. ! return(FeYesNo(msg));
  570.   }
  571. --- 598,604 ----
  572.       msg = "Are you sure? [yn]";
  573.       break;
  574.       }
  575. ! if ( (gv = FeYesNo(msg)) == 0)
  576. !     FeMessage("Concede cancelled.");
  577. ! return(gv);
  578.   }
  579. *** 131src/rcvop.c    Fri Dec 10 16:35:28 1993
  580. --- rcvop.c    Thu Dec  9 14:34:40 1993
  581. ***************
  582. *** 98,105 ****
  583.   g->curbd = boardnums[*rc.initboard - 'a'];    /* display initial board */
  584.   mydie = Rolldie();
  585.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  586. !     if (g->adcnt < g->admax)    /* do an autodouble */
  587. !         g->gameval = 1 << ++(g->adcnt);
  588.       sendpkt(g,TIE);
  589.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  590.       return;            /* opponent will send RESTART */
  591. --- 98,105 ----
  592.   g->curbd = boardnums[*rc.initboard - 'a'];    /* display initial board */
  593.   mydie = Rolldie();
  594.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  595. !     if ( (g->adcnt < g->admax) && ( (g->flags & F_CRGAME) == 0) )
  596. !         g->gameval = 1 << ++(g->adcnt);        /* do an autodouble */
  597.       sendpkt(g,TIE);
  598.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  599.       return;            /* opponent will send RESTART */
  600. ***************
  601. *** 187,194 ****
  602.   clearmvs(g->opmvs);
  603.   mydie = Rolldie();
  604.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  605. !     if (g->adcnt < g->admax)    /* do an autodouble */
  606. !         g->gameval = 1 << ++(g->adcnt);
  607.       sendpkt(g,TIE);
  608.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  609.       return;            /* opponent will send RESTART */
  610. --- 187,194 ----
  611.   clearmvs(g->opmvs);
  612.   mydie = Rolldie();
  613.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  614. !     if ( (g->adcnt < g->admax) && ( (g->flags & F_CRGAME) == 0) )
  615. !         g->gameval = 1 << ++(g->adcnt);        /* do an autodouble */
  616.       sendpkt(g,TIE);
  617.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  618.       return;            /* opponent will send RESTART */
  619. ***************
  620. *** 254,261 ****
  621.   crawford_check(g);            /* is this the Crawford rule game? */
  622.   mydie = Rolldie();
  623.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  624. !     if (g->adcnt < g->admax)    /* do an autodouble */
  625. !         g->gameval = 1 << ++(g->adcnt);
  626.       sendpkt(g,TIE);
  627.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  628.       return;            /* opponent will send RESTART */
  629. --- 254,261 ----
  630.   crawford_check(g);            /* is this the Crawford rule game? */
  631.   mydie = Rolldie();
  632.   if (P.mvs[0].roll == mydie) {        /* a !#$%&@ tie */
  633. !     if ( (g->adcnt < g->admax) && ( (g->flags & F_CRGAME) == 0) )
  634. !         g->gameval = 1 << ++(g->adcnt);        /* do an autodouble */
  635.       sendpkt(g,TIE);
  636.       message("Tie on initial roll with %s (%s).\n",g->opname,g->opaddr);
  637.       return;            /* opponent will send RESTART */
  638. *** 131src/readmail.c    Fri Dec 10 16:35:28 1993
  639. --- readmail.c    Thu Dec  9 12:29:04 1993
  640. ***************
  641. *** 193,200 ****
  642.    *    permanent games        1.1
  643.    * If the incoming packet indicates a feature is not supported by the
  644.    * remote ldb, it is disabled and the game continues as if it had
  645. !  * never been set.  The Crawford rule contained a bug in pre-1.3 games,
  646. !  * so 1.3 will print a warning if an older version tries to start
  647.    * a game with the crawford rule enabled.
  648.    *
  649.    * Getpkt handles RESEND packets itself, performing a resend and
  650. --- 193,200 ----
  651.    *    permanent games        1.1
  652.    * If the incoming packet indicates a feature is not supported by the
  653.    * remote ldb, it is disabled and the game continues as if it had
  654. !  * never been set.  The Crawford rule contained a bug in pre-1.3.2 games,
  655. !  * so 1.3.2 will print a warning if an older version tries to start
  656.    * a game with the crawford rule enabled.
  657.    *
  658.    * Getpkt handles RESEND packets itself, performing a resend and
  659. ***************
  660. *** 344,352 ****
  661.           message(
  662.   "This game will continue as if those features had not been used.\n");
  663.           }
  664. !     if ( (P.version < 130) && (P.gameptr->flags & F_CRAWFORD) )
  665.           message(
  666. ! "Warning: opponent using pre-1.3 ldb -- using Crawford rule not recommended!\n"
  667.           );
  668.       return(1);            /* return success */
  669.       }
  670. --- 344,352 ----
  671.           message(
  672.   "This game will continue as if those features had not been used.\n");
  673.           }
  674. !     if ( (P.version < 132) && (P.gameptr->flags & F_CRAWFORD) )
  675.           message(
  676. ! "Warning: opponent using pre-1.3.2 ldb -- Crawford rule is not recommended!\n"
  677.           );
  678.       return(1);            /* return success */
  679.       }
  680. *** 131src/save.c    Fri Dec 10 16:35:29 1993
  681. --- save.c    Thu Dec  9 12:18:41 1993
  682. ***************
  683. *** 71,77 ****
  684.       s = ".ldbrc";            /* use default file name */
  685.   #endif
  686.   if ( (fp = fopen(s,"r")) == NULL) {
  687. !     printf("'%s' does not exist.  Do you want to create it?",s);
  688.       if ( (fgets(buf,sizeof(buf),stdin) == NULL)
  689.            || ( (*buf != 'y') && (*buf != 'Y') ) )
  690.           fatal("ldb aborted.");
  691. --- 71,77 ----
  692.       s = ".ldbrc";            /* use default file name */
  693.   #endif
  694.   if ( (fp = fopen(s,"r")) == NULL) {
  695. !     printf("'%s' does not exist.  Do you want to create it? ",s);
  696.       if ( (fgets(buf,sizeof(buf),stdin) == NULL)
  697.            || ( (*buf != 'y') && (*buf != 'Y') ) )
  698.           fatal("ldb aborted.");
  699.  
  700. exit 0 # Just in case...
  701.