Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
iswctype.c
Go to the documentation of this file.
1 #include <string.h>
2 #include <wctype.h>
3 
4 int iswctype(wint_t wc, wctype_t type)
5 {
6  switch(type)
7  {
8  case WCTYPE_ALNUM:
9  return iswalnum(wc);
10  case WCTYPE_ALPHA:
11  return iswalpha(wc);
12  case WCTYPE_BLANK:
13  return iswblank(wc);
14  case WCTYPE_CNTRL:
15  return iswcntrl(wc);
16  case WCTYPE_DIGIT:
17  return iswdigit(wc);
18  case WCTYPE_GRAPH:
19  return iswgraph(wc);
20  case WCTYPE_LOWER:
21  return iswlower(wc);
22  case WCTYPE_PRINT:
23  return iswprint(wc);
24  case WCTYPE_PUNCT:
25  return iswpunct(wc);
26  case WCTYPE_SPACE:
27  return iswspace(wc);
28  case WCTYPE_UPPER:
29  return iswupper(wc);
30  case WCTYPE_XDIGIT:
31  return iswxdigit(wc);
32  }
33  return 0;
34 }
int iswpunct(wint_t)
Definition: iswpunct.c:7
unsigned wint_t
Definition: wctype.h:11
int iswdigit(wint_t)
Definition: iswdigit.c:3
#define WCTYPE_SPACE
Definition: wctype.h:26
#define WCTYPE_DIGIT
Definition: wctype.h:21
int iswprint(wint_t)
Definition: iswprint.c:10
#define WCTYPE_ALPHA
Definition: wctype.h:18
#define WCTYPE_LOWER
Definition: wctype.h:23
#define WCTYPE_CNTRL
Definition: wctype.h:20
int iswxdigit(wint_t)
Definition: iswxdigit.c:3
int iswgraph(wint_t)
Definition: iswgraph.c:3
#define WCTYPE_PUNCT
Definition: wctype.h:25
int iswupper(wint_t)
Definition: iswupper.c:3
#define WCTYPE_UPPER
Definition: wctype.h:27
int iswalnum(wint_t)
Definition: iswalnum.c:3
#define WCTYPE_XDIGIT
Definition: wctype.h:28
#define WCTYPE_PRINT
Definition: wctype.h:24
int iswctype(wint_t wc, wctype_t type)
Definition: iswctype.c:4
#define WCTYPE_ALNUM
Definition: wctype.h:17
int iswcntrl(wint_t)
Definition: iswcntrl.c:3
#define WCTYPE_GRAPH
Definition: wctype.h:22
int iswblank(wint_t)
Definition: iswblank.c:4
#define WCTYPE_BLANK
Definition: wctype.h:19
int iswlower(wint_t)
Definition: iswlower.c:3
int iswspace(wint_t)
Definition: iswspace.c:8
unsigned long wctype_t
Definition: wctype.h:12
int iswalpha(wint_t)
Definition: iswalpha.c:7