\function{wrapper()}.
\end{funcdesc}
-Before calling the hook function, \function{wrapper()} turns on
-cbreak mode, turns off echo, and enables the terminal keypad. On
-exit (whether normally or by exception) it restores cooked mode,
-turns on echo, and disables the terminal keypad.
+Before calling the hook function, \function{wrapper()} turns on cbreak
+mode, turns off echo, enables the terminal keypad, and initializes
+colors if the terminal has color support. On exit (whether normally
+or by exception) it restores cooked mode, turns on echo, and disables
+the terminal keypad.
# a special value like curses.KEY_LEFT will be returned
stdscr.keypad(1)
+ # Start color, too. Harmless if the terminal doesn't have
+ # color; user can test with has_color() later on. The try/catch
+ # works around a minor bit of over-conscientiousness in the curses
+ # module -- the error return from C start_color() is ignorable.
+ try:
+ curses.start_color()
+ except:
+ pass
+
res = apply(func, (stdscr,) + rest)
except:
# In the event of an error, restore the terminal
# checks for system services
# (none yet)
+# Cope with the DB mess. If we detect libdba, assume it's a version 2
+# or later DB and should be linked first (before the DB 1.xx stuff in glibc).
+# Also define an appropriate symbol so we can conditionalize code in the
+# dbmmodule; the API has changed since 1.xx.
+AC_CHECK_LIB(dba, __db_mutex_lock)
+
# Linux requires this for correct f.p. operations
AC_CHECK_FUNC(__fpu_control,
[],