URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 207 |
Rev 345 |
/*
|
/*
|
FUNCTION
|
FUNCTION
|
<<isalnum>>---alphanumeric character predicate
|
<<isalnum>>---alphanumeric character predicate
|
|
|
INDEX
|
INDEX
|
isalnum
|
isalnum
|
|
|
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
#include <ctype.h>
|
#include <ctype.h>
|
int isalnum(int <[c]>);
|
int isalnum(int <[c]>);
|
|
|
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
#include <ctype.h>
|
#include <ctype.h>
|
int isalnum(<[c]>);
|
int isalnum(<[c]>);
|
|
|
|
|
DESCRIPTION
|
DESCRIPTION
|
<<isalnum>> is a macro which classifies ASCII integer values by table
|
<<isalnum>> is a macro which classifies ASCII integer values by table
|
lookup. It is a predicate returning non-zero for alphabetic or
|
lookup. It is a predicate returning non-zero for alphabetic or
|
numeric ASCII characters, and <<0>> for other arguments. It is defined
|
numeric ASCII characters, and <<0>> for other arguments. It is defined
|
for all integer values.
|
for all integer values.
|
|
|
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 isalnum>>'.
|
undefining the macro using `<<#undef isalnum>>'.
|
|
|
RETURNS
|
RETURNS
|
<<isalnum>> returns non-zero if <[c]> is a letter (<<a>>--<<z>> or
|
<<isalnum>> returns non-zero if <[c]> is a letter (<<a>>--<<z>> or
|
<<A>>--<<Z>>) or a digit (<<0>>--<<9>>).
|
<<A>>--<<Z>>) or a digit (<<0>>--<<9>>).
|
|
|
PORTABILITY
|
PORTABILITY
|
<<isalnum>> is ANSI C.
|
<<isalnum>> is ANSI C.
|
|
|
No OS subroutines are required.
|
No OS subroutines are required.
|
*/
|
*/
|
|
|
#include <_ansi.h>
|
#include <_ansi.h>
|
#include <ctype.h>
|
#include <ctype.h>
|
|
|
#undef isalnum
|
#undef isalnum
|
|
|
int
|
int
|
_DEFUN(isalnum,(c),int c)
|
_DEFUN(isalnum,(c),int c)
|
{
|
{
|
return(__ctype_ptr__[c+1] & (_U|_L|_N));
|
return(__ctype_ptr__[c+1] & (_U|_L|_N));
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.