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
|
<<iswctype>>---extensible wide-character test
|
<<iswctype>>---extensible wide-character test
|
|
|
INDEX
|
INDEX
|
iswctype
|
iswctype
|
|
|
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
#include <wctype.h>
|
#include <wctype.h>
|
int iswctype(wint_t <[c]>, wctype_t <[desc]>);
|
int iswctype(wint_t <[c]>, wctype_t <[desc]>);
|
|
|
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
#include <wctype.h>
|
#include <wctype.h>
|
int iswctype(<[c]>, <[desc]>)
|
int iswctype(<[c]>, <[desc]>)
|
wint_t <[c]>;
|
wint_t <[c]>;
|
wctype_t <[desc]>;
|
wctype_t <[desc]>;
|
|
|
DESCRIPTION
|
DESCRIPTION
|
<<iswctype>> is a function which classifies wide-character values using the
|
<<iswctype>> is a function which classifies wide-character values using the
|
wide-character test specified by <[desc]>.
|
wide-character test specified by <[desc]>.
|
|
|
RETURNS
|
RETURNS
|
<<iswctype>> returns non-zero if and only if <[c]> matches the test specified by <[desc]>.
|
<<iswctype>> returns non-zero if and only if <[c]> matches the test specified by <[desc]>.
|
If <[desc]> is unknown, zero is returned.
|
If <[desc]> is unknown, zero is returned.
|
|
|
PORTABILITY
|
PORTABILITY
|
<<iswctype>> is C99.
|
<<iswctype>> is C99.
|
|
|
No supporting OS subroutines are required.
|
No supporting OS subroutines are required.
|
*/
|
*/
|
#include <_ansi.h>
|
#include <_ansi.h>
|
#include <wctype.h>
|
#include <wctype.h>
|
#include "local.h"
|
#include "local.h"
|
|
|
int
|
int
|
_DEFUN(iswctype,(c, desc), wint_t c _AND wctype_t desc)
|
_DEFUN(iswctype,(c, desc), wint_t c _AND wctype_t desc)
|
{
|
{
|
switch (desc)
|
switch (desc)
|
{
|
{
|
case WC_ALNUM:
|
case WC_ALNUM:
|
return iswalnum (c);
|
return iswalnum (c);
|
case WC_ALPHA:
|
case WC_ALPHA:
|
return iswalpha (c);
|
return iswalpha (c);
|
case WC_BLANK:
|
case WC_BLANK:
|
return iswblank (c);
|
return iswblank (c);
|
case WC_CNTRL:
|
case WC_CNTRL:
|
return iswcntrl (c);
|
return iswcntrl (c);
|
case WC_DIGIT:
|
case WC_DIGIT:
|
return iswdigit (c);
|
return iswdigit (c);
|
case WC_GRAPH:
|
case WC_GRAPH:
|
return iswgraph (c);
|
return iswgraph (c);
|
case WC_LOWER:
|
case WC_LOWER:
|
return iswlower (c);
|
return iswlower (c);
|
case WC_PRINT:
|
case WC_PRINT:
|
return iswprint (c);
|
return iswprint (c);
|
case WC_PUNCT:
|
case WC_PUNCT:
|
return iswpunct (c);
|
return iswpunct (c);
|
case WC_SPACE:
|
case WC_SPACE:
|
return iswspace (c);
|
return iswspace (c);
|
case WC_UPPER:
|
case WC_UPPER:
|
return iswupper (c);
|
return iswupper (c);
|
case WC_XDIGIT:
|
case WC_XDIGIT:
|
return iswxdigit (c);
|
return iswxdigit (c);
|
default:
|
default:
|
return 0; /* eliminate warning */
|
return 0; /* eliminate warning */
|
}
|
}
|
|
|
/* otherwise unknown */
|
/* otherwise unknown */
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.