1/*	$OpenBSD: ctype.h,v 1.4 2017/09/05 03:16:13 schwarze Exp $	*/
2/*
3 * Copyright (c) 2015 Philip Guenther <guenther@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#ifndef _LIBC_CTYPE_H_
19#define _LIBC_CTYPE_H_
20
21/* sigh: predeclare and rename the functions which we'll declare inline */
22__only_inline int	isalnum(int _c);
23__only_inline int	isalpha(int _c);
24__only_inline int	iscntrl(int _c);
25__only_inline int	isdigit(int _c);
26__only_inline int	isgraph(int _c);
27__only_inline int	islower(int _c);
28__only_inline int	isprint(int _c);
29__only_inline int	ispunct(int _c);
30__only_inline int	isspace(int _c);
31__only_inline int	isupper(int _c);
32__only_inline int	isxdigit(int _c);
33__only_inline int	tolower(int _c);
34__only_inline int	toupper(int _c);
35__only_inline int	isblank(int _c);
36__only_inline int	isascii(int _c);
37__only_inline int	toascii(int _c);
38__only_inline int	_tolower(int _c);
39__only_inline int	_toupper(int _c);
40
41#ifndef	_LOCALE_T_DEFINED_
42#define	_LOCALE_T_DEFINED_
43typedef void	*locale_t;
44#endif
45
46__only_inline int	isalnum_l(int _c, locale_t _l);
47__only_inline int	isalpha_l(int _c, locale_t _l);
48__only_inline int	iscntrl_l(int _c, locale_t _l);
49__only_inline int	isdigit_l(int _c, locale_t _l);
50__only_inline int	isgraph_l(int _c, locale_t _l);
51__only_inline int	islower_l(int _c, locale_t _l);
52__only_inline int	isprint_l(int _c, locale_t _l);
53__only_inline int	ispunct_l(int _c, locale_t _l);
54__only_inline int	isspace_l(int _c, locale_t _l);
55__only_inline int	isupper_l(int _c, locale_t _l);
56__only_inline int	isxdigit_l(int _c, locale_t _l);
57__only_inline int	tolower_l(int _c, locale_t _l);
58__only_inline int	toupper_l(int _c, locale_t _l);
59__only_inline int	isblank_l(int _c, locale_t _l);
60
61PROTO_NORMAL(isalnum);
62PROTO_DEPRECATED(isalnum_l);
63PROTO_NORMAL(isalpha);
64PROTO_DEPRECATED(isalpha_l);
65PROTO_NORMAL(isascii);
66PROTO_NORMAL(isblank);
67PROTO_DEPRECATED(isblank_l);
68PROTO_NORMAL(iscntrl);
69PROTO_DEPRECATED(iscntrl_l);
70PROTO_NORMAL(isdigit);
71PROTO_DEPRECATED(isdigit_l);
72PROTO_NORMAL(isgraph);
73PROTO_DEPRECATED(isgraph_l);
74PROTO_NORMAL(islower);
75PROTO_DEPRECATED(islower_l);
76PROTO_NORMAL(isprint);
77PROTO_DEPRECATED(isprint_l);
78PROTO_NORMAL(ispunct);
79PROTO_DEPRECATED(ispunct_l);
80PROTO_NORMAL(isspace);
81PROTO_DEPRECATED(isspace_l);
82PROTO_NORMAL(isupper);
83PROTO_DEPRECATED(isupper_l);
84PROTO_NORMAL(isxdigit);
85PROTO_DEPRECATED(isxdigit_l);
86PROTO_DEPRECATED(toascii);
87PROTO_NORMAL(tolower);
88PROTO_DEPRECATED(tolower_l);
89PROTO_NORMAL(toupper);
90PROTO_DEPRECATED(toupper_l);
91PROTO_STD_DEPRECATED(_tolower);
92PROTO_STD_DEPRECATED(_toupper);
93
94#include_next <ctype.h>
95
96#if 0
97extern PROTO_NORMAL(_ctype_);
98extern PROTO_NORMAL(_tolower_tab_);
99extern PROTO_NORMAL(_toupper_tab_);
100#endif
101
102#endif /* !_LIBC_CTYPE_H_ */
103