Subversion Repositories Kolibri OS

Rev

Rev 4872 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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