Rev 4872 | Go to most recent revision | 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 when < |
||
26 | |||
27 | |||
28 | undefining either macro using `<<#undef isprint>>' or `<<#undef isgraph>>'. |
||
29 | |||
30 | |||
31 | < |
||
32 | (<<0x20>>--<<0x7E>>). |
||
33 | < |
||
34 | character (<<0x20>>) is excluded. |
||
35 | |||
36 | |||
37 | < |
||
38 | |||
39 | |||
40 | */ |
||
41 | |||
42 | |||
43 | #include |
||
44 | |||
45 | |||
46 | int |
||
47 | _DEFUN(isgraph,(c),int c) |
||
48 | { |
||
49 | return(__ctype_ptr__[c+1] & (_P|_U|_L|_N)); |
||
50 | } |
||
51 | |||
52 | |||
53 | |||
54 | int |
||
55 | _DEFUN(isprint,(c),int c) |
||
56 | { |
||
57 | return(__ctype_ptr__[c+1] & (_P|_U|_L|_N|_B)); |
||
58 | } |
||
59 |