1/*	$OpenBSD: isctype_l.c,v 1.1 2017/09/05 03:16:13 schwarze Exp $ */
2/*
3 * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/*
19 * Only ASCII and UTF-8 are supported, and all single-byte UTF-8
20 * characters agree with ASCII, so always use the ASCII tables.
21 */
22
23#define	_ANSI_LIBRARY
24#include <ctype.h>
25
26#undef isalnum_l
27int
28isalnum_l(int c, locale_t locale __attribute__((__unused__)))
29{
30	return isalnum(c);
31}
32
33#undef isalpha_l
34int
35isalpha_l(int c, locale_t locale __attribute__((__unused__)))
36{
37	return isalpha(c);
38}
39
40#undef isblank_l
41int
42isblank_l(int c, locale_t locale __attribute__((__unused__)))
43{
44	return isblank(c);
45}
46
47#undef iscntrl_l
48int
49iscntrl_l(int c, locale_t locale __attribute__((__unused__)))
50{
51	return iscntrl(c);
52}
53
54#undef isdigit_l
55int
56isdigit_l(int c, locale_t locale __attribute__((__unused__)))
57{
58	return isdigit(c);
59}
60
61#undef isgraph_l
62int
63isgraph_l(int c, locale_t locale __attribute__((__unused__)))
64{
65	return isgraph(c);
66}
67
68#undef islower_l
69int
70islower_l(int c, locale_t locale __attribute__((__unused__)))
71{
72	return islower(c);
73}
74
75#undef isprint_l
76int
77isprint_l(int c, locale_t locale __attribute__((__unused__)))
78{
79	return isprint(c);
80}
81
82#undef ispunct_l
83int
84ispunct_l(int c, locale_t locale __attribute__((__unused__)))
85{
86	return ispunct(c);
87}
88
89#undef isspace_l
90int
91isspace_l(int c, locale_t locale __attribute__((__unused__)))
92{
93	return isspace(c);
94}
95
96#undef isupper_l
97int
98isupper_l(int c, locale_t locale __attribute__((__unused__)))
99{
100	return isupper(c);
101}
102
103#undef isxdigit_l
104int
105isxdigit_l(int c, locale_t locale __attribute__((__unused__)))
106{
107	return isxdigit(c);
108}
109
110#undef tolower_l
111int
112tolower_l(int c, locale_t locale __attribute__((__unused__)))
113{
114	return tolower(c);
115}
116
117#undef toupper_l
118int
119toupper_l(int c, locale_t locale __attribute__((__unused__)))
120{
121	return toupper(c);
122}
123