Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1693 serge 1
 
2
FUNCTION
3
<>---punctuation character predicate
4
5
 
6
ispunct
7
8
 
9
#include 
10
int ispunct(int <[c]>);
11
12
 
13
#include 
14
int ispunct(<[c]>);
15
16
 
17
<> is a macro which classifies ASCII integer values by table
18
lookup.  It is a predicate returning non-zero for printable
19
punctuation characters, and 0 for other characters.  It is defined
20
only when <>(<[c]>) is true or <[c]> is EOF.
21
22
 
23
undefining the macro using `<<#undef ispunct>>'.
24
25
 
26
<> returns non-zero if <[c]> is a printable punctuation character
27
(<) && !isalnum(<[c]>)>>).
28
29
 
30
<> is ANSI C.
31
32
 
33
*/
34
35
 
36
#include 
37
38
 
39
 
40
int
41
_DEFUN(ispunct,(c),int c)
42
{
43
	return(__ctype_ptr__[c+1] & _P);
44
}
45