summaryrefslogtreecommitdiff
path: root/mcon/U/d_ckeypad.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/d_ckeypad.U')
-rw-r--r--mcon/U/d_ckeypad.U54
1 files changed, 54 insertions, 0 deletions
diff --git a/mcon/U/d_ckeypad.U b/mcon/U/d_ckeypad.U
new file mode 100644
index 0000000..0430877
--- /dev/null
+++ b/mcon/U/d_ckeypad.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ckeypad.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ckeypad: cat cc termlib Setvar
+?MAKE: -pick add $@ %<
+?S:d_ckeypad:
+?S: This variable controls the definition of HAS_CURSES_KEYPAD,
+?S: which tells the application that the keypad() curses function
+?S: is available.
+?S:.
+?C:HAS_CURSES_KEYPAD:
+?C: This symbol indicates the availability of the keypad() function
+?C: of the curses library.
+?C:.
+?H:#$d_ckeypad HAS_CURSES_KEYPAD /**/
+?H:.
+?LINT:set d_ckeypad
+: check for the "keypad()" function in the curses library
+echo " "
+case "$termlib" in
+'')
+ echo "You don't have a curses library, so I won't waste time looking" >&4
+ echo "to see if has the keypad() function." >&4
+*)
+echo "Checking the curses library ($termlib) for the keypad() function..." >&4
+ $cat >c_keypad.c <<'EOCP'
+#include <curses.h>
+int main() {
+ keypad(stdscr, TRUE);
+ exit(0);
+}
+EOCP
+ if $cc c_keypad.c >c_keypad.out 2>&1 ; then
+ val=$define
+ echo "It appears to have the keypad() function."
+ else
+ val=$undef
+ echo "Your curses library doesn't appear to have the keypad() function."
+ fi
+esac
+set d_ckeypad
+eval $setvar
+