Provide a Raw version of ShowNodeCnt to avoid more #ifdef's.
[gnushogi.git] / gnushogi / rawdsp.c
index d3f3055..4225f32 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <ctype.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/file.h>
@@ -123,6 +124,30 @@ Raw_ShowMessage(char *s)
 
 
 void
+Raw_Printf(const char *format, ...)
+{
+    va_list ap;
+    va_start(ap, format);
+    vprintf(format, ap);
+    va_end(ap);
+}
+
+void
+Raw_doRequestInputString(const char* fmt, char* buffer)
+{
+    scanf(fmt, buffer);
+}
+
+
+void
+Raw_ShowNodeCnt(long NodeCnt)
+{
+    printf(CP[91],
+           NodeCnt, (((et) ? ((NodeCnt * 100) / et) : 0)));
+}
+
+
+void
 Raw_ShowPatternCount(short side, short n)
 {
     if (flag.post)
@@ -315,9 +340,6 @@ Raw_help(void)
            (TCflag) ? CP[93] : CP[92],
            TimeControl.moves[black], TimeControl.clock[black] / 100,
            TCadd/100, MaxSearchDepth);
-
-    signal(SIGINT, Raw_TerminateSearch);
-    signal(SIGQUIT, Raw_TerminateSearch);
 }
 
 
@@ -489,9 +511,6 @@ SetupBoard(void)
 void
 Raw_SearchStartStuff(short side)
 {
-    signal(SIGINT, Raw_TerminateSearch);
-    signal(SIGQUIT, Raw_TerminateSearch);
-
     if (flag.post)
     {
         printf(CP[123],
@@ -969,4 +988,3 @@ Raw_ShowPostnValues(void)
            mtl[opponent], pscore[opponent], GameType[opponent]);
     printf("\nhung black %d hung white %d\n", hung[black], hung[white]);
 }
-