static void
-ClearMessage(void)
+gotoXY(short x, short y)
{
- gotoXY(TAB, 6);
- ClearEoln();
+ move(y - 1, x - 1);
}
static void
-gotoXY(short x, short y)
+ClearMessage(void)
{
- move(y - 1, x - 1);
+ gotoXY(TAB, 6);
+ ClearEoln();
}
void
-Curses_AlwaysShowMessage(const char *format, ...)
+Curses_AlwaysShowMessage(const char *format, va_list ap)
{
static char buffer[60];
- va_list ap;
- va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
Curses_ShowMessage(buffer);
- va_end(ap);
}
void
-Curses_Printf(const char *format, ...)
+Curses_Printf(const char *format, va_list ap)
{
static char buffer[60];
- va_list ap;
- va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
printw("%s", buffer);
- va_end(ap);
}
}
-static void
+void
Curses_ShowPrompt(void)
{
Curses_ShowSidetoMove();
}
-static void
-UpdateClocks(void)
+void
+Curses_UpdateClocks(void)
{
short m, s;
long dt;
}
-/*
- * Determine the time that has passed since the search was started. If the
- * elapsed time exceeds the target(ResponseTime + ExtraTime) then set timeout
- * to true which will terminate the search.
- * iop = COMPUTE_MODE calculate et, bump ETnodes
- * iop = COMPUTE_AND_INIT_MODE calculate et, set timeout if time exceeded,
- * set reference time
- */
void
-Curses_ElapsedTime(ElapsedTime_mode iop)
+Curses_PollForInput(void)
{
- long current_time;
int i;
int nchar;
-#ifdef HAVE_GETTIMEOFDAY
- struct timeval tv;
-#endif
-
if ((i = ioctl((int) 0, FIONREAD, &nchar)))
{
perror("FIONREAD");
flag.bothsides = false;
}
+}
+
+/*
+ * Determine the time that has passed since the search was started. If the
+ * elapsed time exceeds the target(ResponseTime + ExtraTime) then set timeout
+ * to true which will terminate the search.
+ * iop = COMPUTE_MODE calculate et, bump ETnodes
+ * iop = COMPUTE_AND_INIT_MODE calculate et, set timeout if time exceeded,
+ * set reference time
+ */
+void
+Curses_ElapsedTime(ElapsedTime_mode iop)
+{
+ long current_time;
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval tv;
+#endif
+
+ PollForInput();
#ifdef HAVE_GETTIMEOFDAY
gettimeofday(&tv, NULL);