Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | FUNCTION |
---|
3 | <<islower>>, <<islower_l>>---lowercase character predicate |
---|
4 | |
---|
5 | INDEX |
---|
6 | islower |
---|
7 | |
---|
8 | INDEX |
---|
9 | islower_l |
---|
10 | |
---|
11 | SYNOPSIS |
---|
12 | #include <ctype.h> |
---|
13 | int islower(int <[c]>); |
---|
14 | |
---|
15 | #include <ctype.h> |
---|
16 | int islower_l(int <[c]>, locale_t <[locale]>); |
---|
17 | |
---|
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. |
---|
24 | |
---|
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. |
---|
28 | |
---|
29 | You can use a compiled subroutine instead of the macro definition by |
---|
30 | undefining the macro using `<<#undef islower>>' or `<<#undef islower_l>>'. |
---|
31 | |
---|
32 | RETURNS |
---|
33 | <<islower>>, <<islower_l>> return non-zero if <[c]> is a lowercase letter. |
---|
34 | |
---|
35 | PORTABILITY |
---|
36 | <<islower>> is ANSI C. |
---|
37 | <<islower_l>> is POSIX-1.2008. |
---|
38 | |
---|
39 | No supporting OS subroutines are required. |
---|
40 | */ |
---|
41 | #include <_ansi.h> |
---|
42 | #include <ctype.h> |
---|
43 | |
---|
44 | #undef islower |
---|
45 | int |
---|
46 | islower (int c) |
---|
47 | { |
---|
48 | return ((__CTYPE_PTR[c+1] & (_U|_L)) == _L); |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.