Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: d_isascii.U,v 3.0.1.2 1994/10/29 16:13:39 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
4 | ?RCS: | |
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 3.0. | |
10 | ?RCS: | |
11 | ?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu> | |
12 | ?RCS: | |
13 | ?RCS: $Log: d_isascii.U,v $ | |
14 | ?RCS: Revision 3.0.1.2 1994/10/29 16:13:39 ram | |
15 | ?RCS: patch36: added 'ldflags' to the test compile line (ADO) | |
16 | ?RCS: | |
17 | ?RCS: Revision 3.0.1.1 1994/08/29 16:09:32 ram | |
18 | ?RCS: patch32: created by ADO | |
19 | ?RCS: | |
1273bb5e | 20 | ?MAKE:d_isascii: Compile cat rm Setvar i_stdlib |
959f3c4c JH |
21 | ?MAKE: -pick add $@ %< |
22 | ?S:d_isascii: | |
23 | ?S: This variable conditionally defines the HAS_ISASCII constant, | |
24 | ?S: which indicates to the C program that isascii() is available. | |
25 | ?S:. | |
26 | ?C:HAS_ISASCII: | |
efef9498 | 27 | ?C: This manifest constant lets the C program know that isascii |
959f3c4c JH |
28 | ?C: is available. |
29 | ?C:. | |
30 | ?H:#$d_isascii HAS_ISASCII /**/ | |
31 | ?H:. | |
32 | ?LINT:set d_isascii | |
33 | ?X: Can't use Inlibc because isascii() might be a macro. | |
34 | : Look for isascii | |
35 | echo " " | |
1273bb5e | 36 | $cat >isascii.c <<EOCP |
959f3c4c JH |
37 | #include <stdio.h> |
38 | #include <ctype.h> | |
1273bb5e JH |
39 | #$i_stdlib I_STDLIB |
40 | #ifdef I_STDLIB | |
41 | #include <stdlib.h> | |
42 | #endif | |
959f3c4c JH |
43 | int main() { |
44 | int c = 'A'; | |
45 | if (isascii(c)) | |
46 | exit(0); | |
47 | else | |
48 | exit(1); | |
49 | } | |
50 | EOCP | |
51 | set isascii | |
52 | if eval $compile; then | |
53 | echo "isascii() found." >&4 | |
54 | val="$define" | |
55 | else | |
56 | echo "isascii() NOT found." >&4 | |
57 | val="$undef" | |
58 | fi | |
59 | set d_isascii | |
60 | eval $setvar | |
61 | $rm -f isascii* | |
62 |