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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [ctype/] [isalpha.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
        <<isalpha>>---alphabetic character predicate
4
 
5
INDEX
6
        isalpha
7
 
8
ANSI_SYNOPSIS
9
        #include <ctype.h>
10
        int isalpha(int <[c]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <ctype.h>
14
        int isalpha(<[c]>);
15
 
16
DESCRIPTION
17
<<isalpha>> is a macro which classifies ASCII integer values by table
18
lookup.  It is a predicate returning non-zero when <[c]> represents an
19
alphabetic ASCII character, and 0 otherwise.  It is defined only when
20
<<isascii>>(<[c]>) is true or <[c]> is EOF.
21
 
22
You can use a compiled subroutine instead of the macro definition by
23
undefining the macro using `<<#undef isalpha>>'.
24
 
25
RETURNS
26
<<isalpha>> returns non-zero if <[c]> is a letter (<<A>>--<<Z>> or
27
<<a>>--<<z>>).
28
 
29
PORTABILITY
30
<<isalpha>> is ANSI C.
31
 
32
No supporting OS subroutines are required.
33
*/
34
 
35
#include <_ansi.h>
36
#include <ctype.h>
37
 
38
#undef isalpha
39
int
40
_DEFUN(isalpha,(c),int c)
41
{
42
        return((_ctype_ + 1)[c] & (_U|_L));
43
}
44
 

powered by: WebSVN 2.1.0

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