blob: 0430877f62a4e375d78b4b647b8d009e390d5703 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
|