*** /tmp/DIST/nondsp.c	Mon Jul 29 07:36:12 1991
--- nondsp.c	Wed Jul 24 10:36:20 1991
***************
*** 53,59 ****
  short int debuglevel = 0;
  FILE *debugfd;
  #endif /*DEBUG*/
! #ifdef CHESSTOOL
  short int chesstool = 1;
  #else
  short int chesstool = 0;
--- 53,59 ----
  short int debuglevel = 0;
  FILE *debugfd;
  #endif /*DEBUG*/
! #if defined CHESSTOOL || defined XBOARD
  short int chesstool = 1;
  #else
  short int chesstool = 0;
***************
*** 70,76 ****
  Initialize (void)
  {
    mycnt1 = mycnt2 = 0;
! #ifdef CHESSTOOL
    setlinebuf (stdout);
    /* setvbuf(stdout,NULL,_IOLBF,BUFSIZ); */
    printf ("Chess\n");
--- 70,76 ----
  Initialize (void)
  {
    mycnt1 = mycnt2 = 0;
! #if defined CHESSTOOL || defined XBOARD
    setlinebuf (stdout);
    /* setvbuf(stdout,NULL,_IOLBF,BUFSIZ); */
    printf ("Chess\n");
***************
*** 220,226 ****
--- 220,230 ----
        if (SqAtakd (PieceList[opponent][0], computer))
  	{
  	  UnmakeMove (opponent, &xnode, &tempb, &tempc, &tempsf, &tempst);
+ #if defined CHESSTOOL
+ 	  printz ("Illegal move\n");
+ #else
  	  printz ("Illegal move..(you are in check)\n");
+ #endif /*CHESSTOOL*/
  	  return (false);
  	}
        else
***************
*** 246,254 ****
  	  return (true);
  	}
      }
! #ifdef CHESSTOOL
    printz ("Illegal move (no matching move generated)");
    printz ("%s\n", s);
  #ifdef DEBUG
    if (true)
      {
--- 250,261 ----
  	  return (true);
  	}
      }
! #if defined CHESSTOOL 
!   printz ("Illegal move\n");
! #else
    printz ("Illegal move (no matching move generated)");
    printz ("%s\n", s);
+ #endif /*CHESSTOOL*/
  #ifdef DEBUG
    if (true)
      {
***************
*** 280,286 ****
        fprintf (debugfd, "\n");
      }
  #endif /* DEBUG*/
! #else
    if (cnt > 1)
      ShowMessage ("Ambiguous Move!");
  #endif /*CHESSTOOL*/
--- 287,293 ----
        fprintf (debugfd, "\n");
      }
  #endif /* DEBUG*/
! #if !defined CHESSTOOL && !defined XBOARD
    if (cnt > 1)
      ShowMessage ("Ambiguous Move!");
  #endif /*CHESSTOOL*/
***************
*** 477,483 ****
  ShowResults (short int score, short unsigned int *bstline, char ch)
  {
    register int i;
! #ifndef CHESSTOOL
    if (flag.post)
      {
        fprintf (stderr, "%2d%c %6d %4ld %8ld  ", Sdepth, ch, score, et, NodeCnt);
--- 484,490 ----
  ShowResults (short int score, short unsigned int *bstline, char ch)
  {
    register int i;
! #if !defined CHESSTOOL && !defined XBOARD
    if (flag.post)
      {
        fprintf (stderr, "%2d%c %6d %4ld %8ld  ", Sdepth, ch, score, et, NodeCnt);
***************
*** 499,505 ****
  #ifndef MSDOS
    signal (SIGQUIT, TerminateSearch);
  #endif /* MSDOS */
! #ifndef CHESSTOOL
    if (flag.post)
      {
        fprintf (stderr, "\nMove# %d    Target= %ld    Clock: %ld\n",
--- 506,512 ----
  #ifndef MSDOS
    signal (SIGQUIT, TerminateSearch);
  #endif /* MSDOS */
! #if !defined CHESSTOOL && !defined XBOARD
    if (flag.post)
      {
        fprintf (stderr, "\nMove# %d    Target= %ld    Clock: %ld\n",
***************
*** 531,537 ****
        printz ("%s\n", ColorStr[computer]);
        ExitChess ();
      }
! #ifndef CHESSTOOL
    if (flag.post)
      {
        fprintf (stderr, "Nodes= %ld  Eval= %ld  Rate= %ld  ",
--- 538,544 ----
        printz ("%s\n", ColorStr[computer]);
        ExitChess ();
      }
! #if !defined CHESSTOOL && !defined XBOARD
    if (flag.post)
      {
        fprintf (stderr, "Nodes= %ld  Eval= %ld  Rate= %ld  ",
***************
*** 545,553 ****
  #ifdef DEBUG
    fprintf (debugfd, "My move is: %s\n", mvstr[0]);
  #endif /* DEBUG */
    if (flag.beep)
      printz ("%c", 7);
! 
    if (root->flags & draw)
      fprintf (stderr, "Drawn game!\n");
    else if (root->score == -9999)
--- 552,561 ----
  #ifdef DEBUG
    fprintf (debugfd, "My move is: %s\n", mvstr[0]);
  #endif /* DEBUG */
+ #if !defined CHESSTOOL
    if (flag.beep)
      printz ("%c", 7);
! #endif /*CHESSTOOL*/
    if (root->flags & draw)
      fprintf (stderr, "Drawn game!\n");
    else if (root->score == -9999)
***************
*** 629,635 ****
  void
  ClrScreen (void)
  {
! #ifndef CHESSTOOL
    printz ("\n");
  #endif
  }
--- 637,643 ----
  void
  ClrScreen (void)
  {
! #if !defined CHESSTOOL && !defined XBOARD
    printz ("\n");
  #endif
  }
***************
*** 1065,1071 ****
  void
  PromptForMove (void)
  {
! #ifndef CHESSTOOL
    printz ("\nYour move is? ");
  #endif /* CHESSTOOL */
  }
--- 1073,1079 ----
  void
  PromptForMove (void)
  {
! #if !defined CHESSTOOL && !defined XBOARD
    printz ("\nYour move is? ");
  #endif /* CHESSTOOL */
  }
***************
*** 1230,1241 ****
        player = opponent;
        if (strcmp (s, "bd") == 0)
  	{
! #ifdef CHESSTOOL
  	  chesstool = 0;
  #endif /*CHESSTOOL*/
  	  ClrScreen ();
  	  UpdateDisplay (0, 0, 1, 0);
! #ifdef CHESSTOOL
  	  chesstool = 1;
  #endif /*CHESSTOOL*/
  	}
--- 1238,1249 ----
        player = opponent;
        if (strcmp (s, "bd") == 0)
  	{
! #if defined CHESSTOOL || defined XBOARD
  	  chesstool = 0;
  #endif /*CHESSTOOL*/
  	  ClrScreen ();
  	  UpdateDisplay (0, 0, 1, 0);
! #if defined CHESSTOOL || defined XBOARD
  	  chesstool = 1;
  #endif /*CHESSTOOL*/
  	}
***************
*** 1367,1373 ****
        computer = opponent;
        opponent = otherside[computer];
      }
! #ifdef CHESSTOOL
    printf ("%d. %s", ++mycnt2, s);
    if (flag.post)
      {
--- 1375,1381 ----
        computer = opponent;
        opponent = otherside[computer];
      }
! #if defined CHESSTOOL || defined XBOARD
    printf ("%d. %s", ++mycnt2, s);
    if (flag.post)
      {
