Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / ctype / isascii.c
blob5adb81222e165a7b2639f008449a742d0ea4f602
1 /*
2 FUNCTION
3 <<isascii>>, <<isascii_l>>---ASCII character predicate
5 INDEX
6 isascii
8 INDEX
9 isascii_l
11 SYNOPSIS
12 #include <ctype.h>
13 int isascii(int <[c]>);
15 #include <ctype.h>
16 int isascii_l(int <[c]>, locale_t <[locale]>);
18 DESCRIPTION
19 <<isascii>> is a macro which returns non-zero when <[c]> is an ASCII
20 character, and 0 otherwise. It is defined for all integer values.
22 <<isascii_l>> is like <<isascii>> but performs the check based on the
23 locale specified by the locale object locale. If <[locale]> is
24 LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
26 You can use a compiled subroutine instead of the macro definition by
27 undefining the macro using `<<#undef isascii>>' or `<<#undef isascii_l>>'.
29 RETURNS
30 <<isascii>>, <<isascii_l>> return non-zero if the low order byte of <[c]>
31 is in the range 0 to 127 (<<0x00>>--<<0x7F>>).
33 PORTABILITY
34 <<isascii>> is ANSI C.
35 <<isascii_l>> is a GNU extension.
37 No supporting OS subroutines are required.
39 #include <_ansi.h>
40 #include <ctype.h>
44 #undef isascii
46 int
47 isascii (int c)
49 return c >= 0 && c< 128;