Ensure the player names are refreshed after a switch (impacts Curses mode).
[gnushogi.git] / gnushogi / commondsp.c
index 8750fcd..33d1068 100644 (file)
@@ -6,6 +6,7 @@
  * ----------------------------------------------------------------------
  * 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
  *
  *
  */
 
+/* request *snprintf prototypes */
+#define _POSIX_C_SOURCE 200112L
+#include <stdio.h>
+
 #if defined HAVE_GETTIMEOFDAY
 #include <sys/time.h>
 #endif
@@ -372,17 +377,17 @@ parser(char *f, int side, short *fpiece)
 
     if (f[1] == '*' || f[1] == '\'')
     {
-        c2 = COL_NAME(f[2]);
-        r2 = ROW_NAME(f[3]);
+        c2 = COL_NUM(f[2]);
+        r2 = ROW_NUM(f[3]);
 
         return ((NO_SQUARES + *fpiece) << 8) | locn(r2, c2);
     }
     else
     {
-        c1 = COL_NAME(f[1]);
-        r1 = ROW_NAME(f[2]);
-        c2 = COL_NAME(f[3]);
-        r2 = ROW_NAME(f[4]);
+        c1 = COL_NUM(f[1]);
+        r1 = ROW_NUM(f[2]);
+        c2 = COL_NUM(f[3]);
+        r2 = ROW_NUM(f[4]);
         p = (f[5] == '+') ? 0x80 : 0;
 
         return (locn(r1, c1) << 8) | locn(r2, c2) | p;
@@ -1807,6 +1812,7 @@ InputCommand(char *command)
             flag.force = false;
             Sdepth = 0;
             ok = true;
+            UpdateDisplay(0, 0, 1, 0);
         }
         else if (strcmp(s, "black") == 0)
         {