AC_SUBST(MKDEP)
AC_SUBST(MKDEP_DIRECT)
+AC_SEARCH_LIBS(use_default_colors, [ncurses],
+[
+ AC_MSG_RESULT([Using ncurses and color.])
+ AC_DEFINE(USE_NCURSES_COLOR,1,[Use ncurses and color])
+],
+[
+ AC_MSG_RESULT([Not using ncurses, not using color.])
+])
+
AC_PROG_INSTALL
-AC_SEARCH_LIBS(initscr, [curses ncurses], [], [
+AC_SEARCH_LIBS(initscr, [ncurses curses], [], [
AC_MSG_ERROR([Cannot find curses or ncurses devel libs.])
])
for (di = 0; di < ARRAY_SIZE(watchcols); di++) {
char tmpbuf[80];
+ int hilite = 0;
switch (watchcols[di].dat) {
default: break;
case 0: tmpbuf[0] = selectorchars[i]; tmpbuf[1] = '\0'; break;
case 1: snprintf(tmpbuf, 80, "%s", games[i + offset]->name); break;
case 2: snprintf(tmpbuf, 80, "%s", myconfig[games[i + offset]->gamenum]->shortname); break;
- case 3: snprintf(tmpbuf, 80, "%s", gametype); break;
+ case 3:
+ snprintf(tmpbuf, 80, "%s", gametype);
+ if ((games[i+offset]->ws_col > COLS || games[i+offset]->ws_row > LINES))
+ hilite = CLR_RED;
+ break;
case 4: snprintf(tmpbuf, 80, "%s %s", games[i + offset]->date, games[i + offset]->time); break;
case 5: snprintf(tmpbuf, 80, "%s", idletime); break;
#ifdef USE_SHMEM
#endif
}
tmpbuf[79] = '\0';
+ if (hilite) attron(hilite);
mvprintw(top_banner_hei + 1 + i, watchcols[di].x, watchcols[di].fmt, tmpbuf);
+ if (hilite) {
+ attron(CLR_NORMAL);
+ hilite = 0;
+ }
}
if (i + offset == selected) attroff(selected_attr);
nonl ();
intrflush (stdscr, FALSE);
keypad (stdscr, TRUE);
+#ifdef USE_NCURSES_COLOR
+ start_color();
+ use_default_colors();
+ init_pair(1, -1, -1);
+ init_pair(2, COLOR_RED, -1);
+#endif
}
/* ************************************************************* */
#define DGL_PASSWDLEN 20 /* max. length of passwords */
#define DGL_MAILMSGLEN 80 /* max. length of mail message */
+#ifdef USE_NCURSES_COLOR
+# define CLR_NORMAL COLOR_PAIR(1) | A_NORMAL
+# define CLR_RED COLOR_PAIR(2) | A_NORMAL
+#else
+# define CLR_NORMAL 0
+# define CLR_RED 0
+#endif
+
typedef enum
{
DGLTIME_DGLSTART = 0, /* when someone telnets in */