Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / ctype / isupper.c
blobaeed383ecdea82d0f2f9bf5da5bc28511141e176
1 /*
2 FUNCTION
3 <<isupper>>, <<isupper_l>>---uppercase character predicate
5 INDEX
6 isupper
8 INDEX
9 isupper_l
11 SYNOPSIS
12 #include <ctype.h>
13 int isupper(int <[c]>);
15 #include <ctype.h>
16 int isupper_l(int <[c]>, locale_t <[locale]>);
18 DESCRIPTION
19 <<isupper>> is a macro which classifies singlebyte charset values by table
20 lookup. It is a predicate returning non-zero for uppercase letters
21 (<<A>>--<<Z>>), and 0 for other characters.
23 <<isupper_l>> is like <<isupper>> but performs the check based on the
24 locale specified by the locale object locale. If <[locale]> is
25 LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
27 You can use a compiled subroutine instead of the macro definition by
28 undefining the macro using `<<#undef isupper>>' or `<<#undef isupper_l>>'.
30 RETURNS
31 <<isupper>>, <<isupper_l>> return non-zero if <[c]> is an uppercase letter.
33 PORTABILITY
34 <<isupper>> is ANSI C.
35 <<isupper_l>> is POSIX-1.2008.
37 No supporting OS subroutines are required.
39 #include <_ansi.h>
40 #include <ctype.h>
42 #undef isupper
43 int
44 isupper (int c)
46 return ((__CTYPE_PTR[c+1] & (_U|_L)) == _U);