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
|
<<ispunct>>---punctuation character predicate
|
<<ispunct>>---punctuation character predicate
|
|
|
INDEX
|
INDEX
|
ispunct
|
ispunct
|
|
|
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
#include <ctype.h>
|
#include <ctype.h>
|
int ispunct(int <[c]>);
|
int ispunct(int <[c]>);
|
|
|
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
#include <ctype.h>
|
#include <ctype.h>
|
int ispunct(<[c]>);
|
int ispunct(<[c]>);
|
|
|
DESCRIPTION
|
DESCRIPTION
|
<<ispunct>> is a macro which classifies ASCII integer values by table
|
<<ispunct>> is a macro which classifies ASCII integer values by table
|
lookup. It is a predicate returning non-zero for printable
|
lookup. It is a predicate returning non-zero for printable
|
punctuation characters, and 0 for other characters. It is defined
|
punctuation characters, and 0 for other characters. It is defined
|
only when <<isascii>>(<[c]>) is true or <[c]> is EOF.
|
only when <<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 ispunct>>'.
|
undefining the macro using `<<#undef ispunct>>'.
|
|
|
RETURNS
|
RETURNS
|
<<ispunct>> returns non-zero if <[c]> is a printable punctuation character
|
<<ispunct>> returns non-zero if <[c]> is a printable punctuation character
|
(<<isgraph(<[c]>) && !isalnum(<[c]>)>>).
|
(<<isgraph(<[c]>) && !isalnum(<[c]>)>>).
|
|
|
PORTABILITY
|
PORTABILITY
|
<<ispunct>> is ANSI C.
|
<<ispunct>> 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 ispunct
|
#undef ispunct
|
int
|
int
|
_DEFUN(ispunct,(c),int c)
|
_DEFUN(ispunct,(c),int c)
|
{
|
{
|
return(__ctype_ptr__[c+1] & _P);
|
return(__ctype_ptr__[c+1] & _P);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.