OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [ctype/] [isascii.c] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1005 ivang
/*
2
FUNCTION
3
        <<isascii>>---ASCII character predicate
4
 
5
INDEX
6
        isascii
7
 
8
ANSI_SYNOPSIS
9
        #include <ctype.h>
10
        int isascii(int <[c]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <ctype.h>
14
        int isascii(<[c]>);
15
 
16
DESCRIPTION
17
<<isascii>> is a macro which returns non-zero when <[c]> is an ASCII
18
character, and 0 otherwise.  It is defined for all integer values.
19
 
20
You can use a compiled subroutine instead of the macro definition by
21
undefining the macro using `<<#undef isascii>>'.
22
 
23
RETURNS
24
<<isascii>> returns non-zero if the low order byte of <[c]> is in the range
25
 
26
 
27
PORTABILITY
28
<<isascii>> is ANSI C.
29
 
30
No supporting OS subroutines are required.
31
*/
32
#include <_ansi.h>
33
#include <ctype.h>
34
 
35
 
36
 
37
#undef isascii
38
 
39
int
40
_DEFUN(isascii,(c),int c)
41
{
42
        return c >= 0 && c< 128;
43
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.