source: trunk/libs/newlib/src/newlib/libc/ctype/isascii.c @ 444

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.1 KB
RevLine 
[444]1/*
2FUNCTION
3        <<isascii>>, <<isascii_l>>---ASCII character predicate
4
5INDEX
6        isascii
7
8INDEX
9        isascii_l
10
11SYNOPSIS
12        #include <ctype.h>
13        int isascii(int <[c]>);
14
15        #include <ctype.h>
16        int isascii_l(int <[c]>, locale_t <[locale]>);
17
18DESCRIPTION
19<<isascii>> is a macro which returns non-zero when <[c]> is an ASCII
20character, and 0 otherwise.  It is defined for all integer values.
21
22<<isascii_l>> is like <<isascii>> but performs the check based on the
23locale specified by the locale object locale.  If <[locale]> is
24LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
25
26You can use a compiled subroutine instead of the macro definition by
27undefining the macro using `<<#undef isascii>>' or `<<#undef isascii_l>>'.
28
29RETURNS
30<<isascii>>, <<isascii_l>> return non-zero if the low order byte of <[c]>
31is in the range 0 to 127 (<<0x00>>--<<0x7F>>).
32
33PORTABILITY
34<<isascii>> is ANSI C.
35<<isascii_l>> is a GNU extension.
36
37No supporting OS subroutines are required.
38*/
39#include <_ansi.h>
40#include <ctype.h>
41
42
43
44#undef isascii
45
46int 
47isascii (int c)
48{
49        return c >= 0 && c< 128;
50}
Note: See TracBrowser for help on using the repository browser.