Go to most recent revision |
Blame |
Last modification |
View Log
| Download
| RSS feed
/*
FUNCTION
<<iswctype>>---extensible wide-character test
INDEX
iswctype
ANSI_SYNOPSIS
#include <wctype.h>
int iswctype(wint_t <[c]>, wctype_t <[desc]>);
TRAD_SYNOPSIS
#include <wctype.h>
int iswctype(<[c]>, <[desc]>)
wint_t <[c]>;
wctype_t <[desc]>;
DESCRIPTION
<<iswctype>> is a function which classifies wide-character values using the
wide-character test specified by <[desc]>.
RETURNS
<<iswctype>> returns non-zero if and only if <[c]> matches the test specified by <[desc]>.
If <[desc]> is unknown, zero is returned.
PORTABILITY
<<iswctype>> is C99.
No supporting OS subroutines are required.
*/
#include <_ansi.h>
#include <wctype.h>
#include "local.h"
int
_DEFUN
(iswctype,(c
, desc
), wint_t c _AND wctype_t desc
)
{
switch (desc)
{
case WC_ALNUM:
case WC_ALPHA:
case WC_BLANK:
return iswblank (c);
case WC_CNTRL:
case WC_DIGIT:
case WC_GRAPH:
case WC_LOWER:
case WC_PRINT:
case WC_PUNCT:
case WC_SPACE:
case WC_UPPER:
case WC_XDIGIT:
default:
return 0; /* eliminate warning */
}
/* otherwise unknown */
return 0;
}