File: iswctype_l.c

package info (click to toggle)
picolibc 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 31,616 kB
  • sloc: ansic: 312,308; asm: 22,739; perl: 2,414; sh: 1,619; python: 1,019; pascal: 329; exp: 287; makefile: 164; xml: 40; cpp: 10
file content (43 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Copyright (c) 2016 Corinna Vinschen <corinna@vinschen.de> */
/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#define _DEFAULT_SOURCE
#include <_ansi.h>
#include <wctype.h>
#include "local.h"

int
iswctype_l (wint_t c, wctype_t desc, struct __locale_t *locale)
{
  switch (desc)
    {
    case WC_ALNUM:
      return iswalnum_l (c, locale);
    case WC_ALPHA:
      return iswalpha_l (c, locale);
    case WC_BLANK:
      return iswblank_l (c, locale);
    case WC_CNTRL:
      return iswcntrl_l (c, locale);
    case WC_DIGIT:
      return iswdigit_l (c, locale);
    case WC_GRAPH:
      return iswgraph_l (c, locale);
    case WC_LOWER:
      return iswlower_l (c, locale);
    case WC_PRINT:
      return iswprint_l (c, locale);
    case WC_PUNCT:
      return iswpunct_l (c, locale);
    case WC_SPACE:
      return iswspace_l (c, locale);
    case WC_UPPER:
      return iswupper_l (c, locale);
    case WC_XDIGIT:
      return iswxdigit_l (c, locale);
    default:
      return 0; /* eliminate warning */
    }

  /* otherwise unknown */
  return 0;
}