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

Subversion Repositories or1k

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

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

Rev 40 Rev 1765
 
 
/*
/*
FUNCTION
FUNCTION
<<isxdigit>>---hexadecimal digit predicate
<<isxdigit>>---hexadecimal digit predicate
 
 
INDEX
INDEX
isxdigit
isxdigit
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
#include <ctype.h>
#include <ctype.h>
int isxdigit(int <[c]>);
int isxdigit(int <[c]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
#include <ctype.h>
#include <ctype.h>
int isxdigit(int <[c]>);
int isxdigit(int <[c]>);
 
 
DESCRIPTION
DESCRIPTION
<<isxdigit>> is a macro which classifies ASCII integer values by table
<<isxdigit>> is a macro which classifies ASCII integer values by table
lookup.  It is a predicate returning non-zero for hexadecimal digits,
lookup.  It is a predicate returning non-zero for hexadecimal digits,
and <<0>> for other characters.  It is defined only when
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 isxdigit>>'.
undefining the macro using `<<#undef isxdigit>>'.
 
 
RETURNS
RETURNS
<<isxdigit>> returns non-zero if <[c]> is a hexadecimal digit
<<isxdigit>> returns non-zero if <[c]> is a hexadecimal digit
(<<0>>--<<9>>, <<a>>--<<f>>, or <<A>>--<<F>>).
(<<0>>--<<9>>, <<a>>--<<f>>, or <<A>>--<<F>>).
 
 
PORTABILITY
PORTABILITY
<<isxdigit>> is ANSI C.
<<isxdigit>> 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 isxdigit
#undef isxdigit
int
int
_DEFUN(isxdigit,(c),int c)
_DEFUN(isxdigit,(c),int c)
{
{
        return((_ctype_ + 1)[c] & ((_X)|(_N)));
        return((_ctype_ + 1)[c] & ((_X)|(_N)));
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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