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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [ctype/] [isalpha.c] - Diff between revs 40 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 40 Rev 1765
/*
/*
FUNCTION
FUNCTION
        <<isalpha>>---alphabetic character predicate
        <<isalpha>>---alphabetic character predicate
 
 
INDEX
INDEX
        isalpha
        isalpha
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int isalpha(int <[c]>);
        int isalpha(int <[c]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <ctype.h>
        #include <ctype.h>
        int isalpha(<[c]>);
        int isalpha(<[c]>);
 
 
DESCRIPTION
DESCRIPTION
<<isalpha>> is a macro which classifies ASCII integer values by table
<<isalpha>> is a macro which classifies ASCII integer values by table
lookup.  It is a predicate returning non-zero when <[c]> represents an
lookup.  It is a predicate returning non-zero when <[c]> represents an
alphabetic ASCII character, and 0 otherwise.  It is defined only when
alphabetic ASCII character, and 0 otherwise.  It is defined only when
<<isascii>>(<[c]>) is true or <[c]> is EOF.
<<isascii>>(<[c]>) is true or <[c]> is EOF.
 
 
You can use a compiled subroutine instead of the macro definition by
You can use a compiled subroutine instead of the macro definition by
undefining the macro using `<<#undef isalpha>>'.
undefining the macro using `<<#undef isalpha>>'.
 
 
RETURNS
RETURNS
<<isalpha>> returns non-zero if <[c]> is a letter (<<A>>--<<Z>> or
<<isalpha>> returns non-zero if <[c]> is a letter (<<A>>--<<Z>> or
<<a>>--<<z>>).
<<a>>--<<z>>).
 
 
PORTABILITY
PORTABILITY
<<isalpha>> is ANSI C.
<<isalpha>> is ANSI C.
 
 
No supporting OS subroutines are required.
No supporting OS subroutines are required.
*/
*/
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <ctype.h>
#include <ctype.h>
 
 
#undef isalpha
#undef isalpha
int
int
_DEFUN(isalpha,(c),int c)
_DEFUN(isalpha,(c),int c)
{
{
        return((_ctype_ + 1)[c] & (_U|_L));
        return((_ctype_ + 1)[c] & (_U|_L));
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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