ctype.h revision 1.33 1 1.33 joerg /* $NetBSD: ctype.h,v 1.33 2013/04/26 17:35:52 joerg Exp $ */
2 1.14 cgd
3 1.13 cgd /*
4 1.13 cgd * Copyright (c) 1989 The Regents of the University of California.
5 1.13 cgd * All rights reserved.
6 1.13 cgd * (c) UNIX System Laboratories, Inc.
7 1.13 cgd * All or some portions of this file are derived from material licensed
8 1.13 cgd * to the University of California by American Telephone and Telegraph
9 1.13 cgd * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10 1.13 cgd * the permission of UNIX System Laboratories, Inc.
11 1.13 cgd *
12 1.13 cgd * Redistribution and use in source and binary forms, with or without
13 1.13 cgd * modification, are permitted provided that the following conditions
14 1.13 cgd * are met:
15 1.13 cgd * 1. Redistributions of source code must retain the above copyright
16 1.13 cgd * notice, this list of conditions and the following disclaimer.
17 1.13 cgd * 2. Redistributions in binary form must reproduce the above copyright
18 1.13 cgd * notice, this list of conditions and the following disclaimer in the
19 1.13 cgd * documentation and/or other materials provided with the distribution.
20 1.24 agc * 3. Neither the name of the University nor the names of its contributors
21 1.13 cgd * may be used to endorse or promote products derived from this software
22 1.13 cgd * without specific prior written permission.
23 1.13 cgd *
24 1.13 cgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 1.13 cgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 1.13 cgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 1.13 cgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 1.13 cgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 1.13 cgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 1.13 cgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 1.13 cgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 1.13 cgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 1.13 cgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 1.13 cgd * SUCH DAMAGE.
35 1.13 cgd *
36 1.14 cgd * @(#)ctype.h 5.3 (Berkeley) 4/3/91
37 1.13 cgd */
38 1.13 cgd
39 1.13 cgd #ifndef _CTYPE_H_
40 1.13 cgd #define _CTYPE_H_
41 1.17 kleink
42 1.23 bjh21 #include <sys/cdefs.h>
43 1.17 kleink #include <sys/featuretest.h>
44 1.17 kleink
45 1.13 cgd __BEGIN_DECLS
46 1.27 perry int isalnum(int);
47 1.27 perry int isalpha(int);
48 1.27 perry int iscntrl(int);
49 1.27 perry int isdigit(int);
50 1.27 perry int isgraph(int);
51 1.27 perry int islower(int);
52 1.27 perry int isprint(int);
53 1.27 perry int ispunct(int);
54 1.27 perry int isspace(int);
55 1.27 perry int isupper(int);
56 1.27 perry int isxdigit(int);
57 1.27 perry int tolower(int);
58 1.27 perry int toupper(int);
59 1.13 cgd
60 1.32 joerg #if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
61 1.32 joerg # ifndef __LOCALE_T_DECLARED
62 1.32 joerg typedef struct _locale *locale_t;
63 1.32 joerg # define __LOCALE_T_DECLARED
64 1.32 joerg # endif
65 1.32 joerg
66 1.32 joerg int isalnum_l(int, locale_t);
67 1.32 joerg int isalpha_l(int, locale_t);
68 1.32 joerg int isblank_l(int, locale_t);
69 1.32 joerg int iscntrl_l(int, locale_t);
70 1.32 joerg int isdigit_l(int, locale_t);
71 1.32 joerg int isgraph_l(int, locale_t);
72 1.32 joerg int islower_l(int, locale_t);
73 1.32 joerg int isprint_l(int, locale_t);
74 1.32 joerg int ispunct_l(int, locale_t);
75 1.32 joerg int isspace_l(int, locale_t);
76 1.32 joerg int isupper_l(int, locale_t);
77 1.32 joerg int isxdigit_l(int, locale_t);
78 1.32 joerg int tolower_l(int, locale_t);
79 1.32 joerg int toupper_l(int, locale_t);
80 1.32 joerg #endif
81 1.32 joerg
82 1.22 bjh21 #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
83 1.27 perry int isascii(int);
84 1.27 perry int toascii(int);
85 1.27 perry int _tolower(int);
86 1.27 perry int _toupper(int);
87 1.13 cgd #endif
88 1.17 kleink
89 1.25 kleink #if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \
90 1.23 bjh21 (_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE)
91 1.27 perry int isblank(int);
92 1.17 kleink #endif
93 1.13 cgd __END_DECLS
94 1.13 cgd
95 1.33 joerg #if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \
96 1.33 joerg !defined(__cplusplus)
97 1.31 tnozaki #include <sys/ctype_inline.h>
98 1.15 kleink #endif
99 1.15 kleink
100 1.13 cgd #endif /* !_CTYPE_H_ */
101