Skip to main content

c/
locale_ctype.rs

1// Copyright (c) 2026 Meng Zhuo
2// SPDX-License-Identifier: BSD-3-Clause
3
4#[no_mangle]
5pub extern "C" fn toascii(c: c_int) -> c_int {
6    c & 0x7f
7}
8
9#[no_mangle]
10pub extern "C" fn isalnum_l(c: c_int, _loc: locale_t) -> c_int {
11    isalnum(c)
12}
13
14#[no_mangle]
15pub extern "C" fn isalpha_l(c: c_int, _loc: locale_t) -> c_int {
16    isalpha(c)
17}
18
19#[no_mangle]
20pub extern "C" fn isblank_l(c: c_int, _loc: locale_t) -> c_int {
21    isblank(c)
22}
23
24#[no_mangle]
25pub extern "C" fn iscntrl_l(c: c_int, _loc: locale_t) -> c_int {
26    iscntrl(c)
27}
28
29#[no_mangle]
30pub extern "C" fn isdigit_l(c: c_int, _loc: locale_t) -> c_int {
31    isdigit(c)
32}
33
34#[no_mangle]
35pub extern "C" fn isgraph_l(c: c_int, _loc: locale_t) -> c_int {
36    isgraph(c)
37}
38
39#[no_mangle]
40pub extern "C" fn islower_l(c: c_int, _loc: locale_t) -> c_int {
41    islower(c)
42}
43
44#[no_mangle]
45pub extern "C" fn isprint_l(c: c_int, _loc: locale_t) -> c_int {
46    isprint(c)
47}
48
49#[no_mangle]
50pub extern "C" fn ispunct_l(c: c_int, _loc: locale_t) -> c_int {
51    ispunct(c)
52}
53
54#[no_mangle]
55pub extern "C" fn isspace_l(c: c_int, _loc: locale_t) -> c_int {
56    isspace(c)
57}
58
59#[no_mangle]
60pub extern "C" fn isupper_l(c: c_int, _loc: locale_t) -> c_int {
61    isupper(c)
62}
63
64#[no_mangle]
65pub extern "C" fn isxdigit_l(c: c_int, _loc: locale_t) -> c_int {
66    isxdigit(c)
67}
68
69#[no_mangle]
70pub extern "C" fn tolower_l(c: c_int, _loc: locale_t) -> c_int {
71    tolower(c)
72}
73
74#[no_mangle]
75pub extern "C" fn toupper_l(c: c_int, _loc: locale_t) -> c_int {
76    toupper(c)
77}