#include <stdarg.h>
#include <unistd.h>
#include <sys/types.h>
-#ifdef VW_PRINTW_IN_CURSES
+#ifdef HAVE_VW_PRINTW
#define _vwprintw vw_printw
#else
/* Ancient curses implementations, this needs testing. Anybody got XENIX? */
int scr_getc(void)
{
+ char buf;
#ifdef HAVE_CURSES_H
- /* This looks scary, the program will hang if mainwindow is null */
if (mainwindow)
return wgetch(mainwindow);
#endif
- return getchar();
+ buf = '\0';
+ read (0, &buf, 1);
+ return buf;
}
int scr_blockread(void)
{
#ifdef HAVE_CURSES_H
if (mainwindow) {
+#ifdef HAVE_WCOLOR_SET
wcolor_set(mainwindow, 1 + (colornum & 7), NULL);
+#endif
if (colornum & 8) {
wattron(mainwindow, A_BOLD);
} else {