Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: d_ckeypad.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
cf39bd7e | 4 | ?RCS: |
d8875586 MBT |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: d_ckeypad.U,v $ | |
12 | ?RCS: Revision 3.0 1993/08/18 12:05:50 ram | |
13 | ?RCS: Baseline for dist 3.0 netwide release. | |
14 | ?RCS: | |
15 | ?MAKE:d_ckeypad: cat cc termlib Setvar | |
16 | ?MAKE: -pick add $@ %< | |
17 | ?S:d_ckeypad: | |
18 | ?S: This variable controls the definition of HAS_CURSES_KEYPAD, | |
19 | ?S: which tells the application that the keypad() curses function | |
20 | ?S: is available. | |
21 | ?S:. | |
22 | ?C:HAS_CURSES_KEYPAD: | |
23 | ?C: This symbol indicates the availability of the keypad() function | |
24 | ?C: of the curses library. | |
25 | ?C:. | |
26 | ?H:#$d_ckeypad HAS_CURSES_KEYPAD /**/ | |
27 | ?H:. | |
28 | ?LINT:set d_ckeypad | |
29 | : check for the "keypad()" function in the curses library | |
30 | echo " " | |
31 | case "$termlib" in | |
32 | '') | |
33 | echo "You don't have a curses library, so I won't waste time looking" >&4 | |
34 | echo "to see if has the keypad() function." >&4 | |
35 | *) | |
36 | echo "Checking the curses library ($termlib) for the keypad() function..." >&4 | |
37 | $cat >c_keypad.c <<'EOCP' | |
38 | #include <curses.h> | |
39 | int main() { | |
40 | keypad(stdscr, TRUE); | |
41 | exit(0); | |
42 | } | |
43 | EOCP | |
44 | if $cc c_keypad.c >c_keypad.out 2>&1 ; then | |
45 | val=$define | |
46 | echo "It appears to have the keypad() function." | |
47 | else | |
48 | val=$undef | |
49 | echo "Your curses library doesn't appear to have the keypad() function." | |
50 | fi | |
51 | esac | |
52 | set d_ckeypad | |
53 | eval $setvar | |
54 |