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 | INDEX |
||
6 | isdigit |
||
7 | |||
8 | ANSI_SYNOPSIS |
||
9 | #include |
||
10 | int isdigit(int <[c]>); |
||
11 | |||
12 | TRAD_SYNOPSIS |
||
13 | #include |
||
14 | int isdigit(<[c]>); |
||
15 | |||
16 | DESCRIPTION |
||
17 | < |
||
18 | lookup. It is a predicate returning non-zero for decimal digits, and 0 for |
||
4921 | Serge | 19 | other characters. It is defined only if <[c]> is representable as an |
20 | unsigned char or if <[c]> is EOF. |
||
4349 | Serge | 21 | |
22 | You can use a compiled subroutine instead of the macro definition by |
||
23 | undefining the macro using `<<#undef isdigit>>'. |
||
24 | |||
25 | RETURNS |
||
26 | < |
||
27 | |||
28 | PORTABILITY |
||
29 | < |
||
30 | |||
31 | No supporting OS subroutines are required. |
||
32 | */ |
||
33 | |||
34 | #include <_ansi.h> |
||
35 | #include |
||
36 | |||
37 | |||
38 | #undef isdigit |
||
39 | int |
||
40 | _DEFUN(isdigit,(c),int c) |
||
41 | { |
||
42 | return(__ctype_ptr__[c+1] & _N); |
||
43 | } |