XBoard: handle xboard-specific commands
[gnushogi.git] / gnushogi / init-common.c
index bd571ce..1f71994 100644 (file)
@@ -1,3 +1,34 @@
+/*
+ * FILE: init-common.c
+ *
+ * ----------------------------------------------------------------------
+ * Copyright (c) 1993, 1994, 1995 Matthias Mutz
+ * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
+ * Copyright (c) 2008, 2013, 2014 Yann Dirson and the Free Software Foundation
+ *
+ * GNU SHOGI is based on GNU CHESS
+ *
+ * Copyright (c) 1988, 1989, 1990 John Stanback
+ * Copyright (c) 1992 Free Software Foundation
+ *
+ * This file is part of GNU SHOGI.
+ *
+ * GNU Shogi is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNU Shogi; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ * ----------------------------------------------------------------------
+ *
+ */
 #include "gnushogi.h"
 #include "pattern.h"
 
@@ -119,7 +150,7 @@ Initialize_data(void)
 
         if (x >= 0)
         {
-            ShowMessage("datatype 'small_short' is unsigned; "
+            dsp->ShowMessage("datatype 'small_short' is unsigned; "
                         "check gnushogi.h\n");
             return 1;
         }
@@ -132,7 +163,7 @@ Initialize_data(void)
     {
         sprintf(buffer, "Cannot allocate %ld bytes for search tree",
                 (long)n);
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         return 1;
     }
 
@@ -142,7 +173,7 @@ Initialize_data(void)
     if (!hashcode)
     {
         sprintf(buffer, "Cannot allocate %ld bytes for hashcode", (long)n);
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         return 1;
     }
 
@@ -154,7 +185,7 @@ Initialize_data(void)
         sprintf(buffer,
                 "Cannot allocate %ld bytes for drop_hashcode",
                 (long)n);
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         return 1;
     }
 
@@ -166,7 +197,7 @@ Initialize_data(void)
         sprintf(buffer,
                 "Cannot allocate %ld bytes for game record",
                 (long)n);
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         return 1;
     }
 
@@ -183,7 +214,7 @@ Initialize_data(void)
             {
                 sprintf(buffer, "cannot allocate %ld space for nextdir %d",
                         (long)(n), i);
-                ShowMessage(buffer);
+                dsp->ShowMessage(buffer);
             }
 
             nextdir[i] = NULL;
@@ -198,7 +229,7 @@ Initialize_data(void)
             {
                 sprintf(buffer, "cannot allocate %ld space for nextpos %d",
                         (long)(n), i);
-                ShowMessage(buffer);
+                dsp->ShowMessage(buffer);
             }
 
             use_nextpos = false;
@@ -216,7 +247,7 @@ Initialize_data(void)
 
     if (!value)
     {
-        ShowMessage("cannot allocate value space");
+        dsp->ShowMessage("cannot allocate value space");
         return 1;
     }
 
@@ -225,7 +256,7 @@ Initialize_data(void)
 
     if (!fscore)
     {
-        ShowMessage("cannot allocate fscore space");
+        dsp->ShowMessage("cannot allocate fscore space");
         return 1;
     }
 
@@ -237,7 +268,7 @@ Initialize_data(void)
     {
         sprintf(buffer, "Cannot allocate %ld bytes for history table",
                 (long)sizeof_history);
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         use_history = false;
     }
 #endif
@@ -253,7 +284,7 @@ Initialize_data(void)
         {
             sprintf(buffer, "Cannot allocate %ld bytes for cache table %ld",
                     (long)n, (long)i);
-            ShowMessage(buffer);
+            dsp->ShowMessage(buffer);
             use_etable = false;
         }
     }
@@ -303,7 +334,7 @@ Initialize_data(void)
     {
         sprintf(buffer, "Cannot allocate %ld bytes for transposition table",
                 (long)(2 * n));
-        ShowMessage(buffer);
+        dsp->ShowMessage(buffer);
         ttable[0] = ttable[1] = NULL;
     }
 #endif /* ttblsz */
@@ -314,7 +345,7 @@ Initialize_data(void)
 
     if (!distdata)
     {
-        ShowMessage("cannot allocate distdata space...");
+        dsp->ShowMessage("cannot allocate distdata space...");
         use_distdata = false;
     }
 #endif