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