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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [ctype/] [isupper.c] - Diff between revs 1005 and 1765

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

Rev 1005 Rev 1765
 
 
/*
/*
FUNCTION
FUNCTION
<<isupper>>---uppercase character predicate
<<isupper>>---uppercase character predicate
 
 
INDEX
INDEX
isupper
isupper
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
#include <ctype.h>
#include <ctype.h>
int isupper(int <[c]>);
int isupper(int <[c]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
#include <ctype.h>
#include <ctype.h>
int isupper(<[c]>);
int isupper(<[c]>);
 
 
DESCRIPTION
DESCRIPTION
<<isupper>> is a macro which classifies ASCII integer values by table
<<isupper>> is a macro which classifies ASCII integer values by table
lookup.  It is a predicate returning non-zero for upper-case letters
lookup.  It is a predicate returning non-zero for upper-case letters
(<<A>>--<<Z>>), and 0 for other characters.  It is defined only when
(<<A>>--<<Z>>), and 0 for other characters.  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 isupper>>'.
undefining the macro using `<<#undef isupper>>'.
 
 
RETURNS
RETURNS
<<isupper>> returns non-zero if <[c]> is a upper case letter (A-Z).
<<isupper>> returns non-zero if <[c]> is a upper case letter (A-Z).
 
 
PORTABILITY
PORTABILITY
<<isupper>> is ANSI C.
<<isupper>> 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 isupper
#undef isupper
int
int
_DEFUN(isupper,(c),int c)
_DEFUN(isupper,(c),int c)
{
{
        return((_ctype_ + 1)[c] & _U);
        return((_ctype_ + 1)[c] & _U);
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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