use ncurses in preference to curses if it's installed; it handles
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 23:34:38 +0000 (23:34 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 23:34:38 +0000 (23:34 +0000)
background colors properly on dtterm, has a larger color pair palette,
and has a bigger terminal database than solaris curses

citadel/ChangeLog
citadel/configure.ac
citadel/screen.c
citadel/setup.c

index 5153ceb1041135f9d2e53105edf6fe872390794d..0e36ff807349cef88cde705cfbdf6a4670ca2688 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 590.149  2002/03/12 23:34:37  nbryant
+ use ncurses in preference to curses if it's installed; it handles
+ background colors properly on dtterm, has a larger color pair palette,
+ and has a bigger terminal database than solaris curses
+
  Revision 590.148  2002/03/12 22:47:17  nbryant
  curses fix: map our normal color pairs into the 0-7 range instead of 1-8,
  in order to make our pairs fit on terminals such as dtterm where COLOR_PAIRS=8.
@@ -3477,4 +3482,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index 14083d78afc052fbb6e96d5387f6be51023b11a1..34d1b555de165ed682de74cd8350c3aaf44e2cce 100644 (file)
@@ -220,8 +220,8 @@ AC_CHECK_LIB(resolv, res_query, RESOLV="$RESOLV -lresolv")
 
 save_LIBS=$LIBS
 LIBS=$CURSES
-AC_SEARCH_LIBS(tgetent, [curses termcap])
-AC_SEARCH_LIBS(initscr, [curses ncurses])
+AC_SEARCH_LIBS(tgetent, [ncurses curses termcap])
+AC_SEARCH_LIBS(initscr, [ncurses curses])
 AC_CHECK_FUNCS(vw_printw wcolor_set)
 CURSES=$LIBS
 LIBS=$save_LIBS
@@ -355,7 +355,7 @@ dnl
 dnl TODO: for the DB header checks, we should check whether the headers
 dnl define db_env_create, somehow
 dnl
-AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db3/db.h db4/db.h)
+AC_CHECK_HEADERS(curses.h ncurses.h dl.h fcntl.h limits.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db3/db.h db4/db.h)
 
 AC_CHECK_HEADER(resolv.h, [SMTP=modules/libsmtp.la; DOMAIN=domain.c])
 AC_SUBST(SMTP)
index a8fd02855d19b02a458c2956de7d67e2a7732767..a6f2dd0cb95ef173649d72fccd008978dbcd34fd 100644 (file)
@@ -5,7 +5,9 @@
  */
 
 #include "sysdep.h"
-#ifdef HAVE_CURSES_H
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#elif defined(HAVE_CURSES_H)
 #include <curses.h>
 #endif
 #include <stdio.h>
index ef0f70ab1440d35246a7f3f2456242a6cee4771b..41aa6ee0c2a8cf2f540b6dc5d15777f1e8b4eff6 100644 (file)
 #include "config.h"
 #include "tools.h"
 
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
 #ifdef OK
 #undef OK
 #endif
+
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
 #include <curses.h>
 #endif
 
+#endif
+
 #define MAXSETUP 5
 
 #define UI_TEXT                0       /* Default setup type -- text only */