Rev 4874 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | |
2 | FUNCTION |
||
3 | < |
||
4 | |||
5 | |||
6 | isprint |
||
7 | INDEX |
||
8 | isgraph |
||
9 | |||
10 | |||
11 | #include |
||
12 | int isprint(int <[c]>); |
||
13 | int isgraph(int <[c]>); |
||
14 | |||
15 | |||
16 | #include |
||
17 | int isprint(<[c]>); |
||
18 | int isgraph(<[c]>); |
||
19 | |||
20 | |||
21 | |||
22 | < |
||
23 | lookup. It is a predicate returning non-zero for printable |
||
24 | characters, and 0 for other character arguments. |
||
25 | It is defined only if <[c]> is representable as an unsigned char or if |
||
4921 | Serge | 26 | <[c]> is EOF. |
27 | |||
4349 | Serge | 28 | |
29 | undefining either macro using `<<#undef isprint>>' or `<<#undef isgraph>>'. |
||
30 | |||
31 | |||
32 | < |
||
33 | (<<0x20>>--<<0x7E>>). |
||
34 | < |
||
35 | character (<<0x20>>) is excluded. |
||
36 | |||
37 | |||
38 | < |
||
39 | |||
40 | |||
41 | */ |
||
42 | |||
43 | |||
44 | #include |
||
45 | |||
46 | |||
47 | int |
||
48 | _DEFUN(isgraph,(c),int c) |
||
49 | { |
||
50 | return(__ctype_ptr__[c+1] & (_P|_U|_L|_N)); |
||
51 | } |
||
52 | |||
53 | |||
54 | |||
55 | int |
||
56 | _DEFUN(isprint,(c),int c) |
||
57 | { |
||
58 | return(__ctype_ptr__[c+1] & (_P|_U|_L|_N|_B)); |
||
59 | } |
||
60 |