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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc2/] [newlib/] [libc/] [ctype/] [isalpha.c] - Diff between revs 207 and 520

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 520
/*
/*
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_ptr__[c+1] & (_U|_L));
        return(__ctype_ptr__[c+1] & (_U|_L));
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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