annotate lib/wctype.in.h @ 10655:8668b19a7032

Avoid gcc warnings because of #pragma GCC system_header on older gcc.
author Bruno Haible <bruno@clisp.org>
date Sat, 18 Oct 2008 02:43:18 +0200
parents 83d12e60b1e0
children 6183b030f375
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
9960
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
3 Copyright (C) 2006-2008 Free Software Foundation, Inc.
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 /* Written by Bruno Haible and Paul Eggert. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 /*
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 * ISO C 99 <wctype.h> for platforms that lack it.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 * <http://www.opengroup.org/susv3xbd/wctype.h.html>
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 *
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 * iswctype, towctrans, towlower, towupper, wctrans, wctype,
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 * wctrans_t, and wctype_t are not yet implemented.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #ifndef _GL_WCTYPE_H
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10454
diff changeset
31 #if __GNUC__ >= 3
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9960
diff changeset
32 @PRAGMA_SYSTEM_HEADER@
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10454
diff changeset
33 #endif
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9960
diff changeset
34
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 #if @HAVE_WINT_T@
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 <wchar.h>.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 included before <wchar.h>. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 # include <stddef.h>
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 # include <stdio.h>
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 # include <time.h>
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 # include <wchar.h>
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 #endif
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 /* Include the original <wctype.h> if it exists.
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 BeOS 5 has the functions but no <wctype.h>. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 /* The include_next requires a split double-inclusion guard. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 #if @HAVE_WCTYPE_H@
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 #endif
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #ifndef _GL_WCTYPE_H
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 #define _GL_WCTYPE_H
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
57 /* Define wint_t. (Also done in wchar.in.h.) */
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
58 #if !@HAVE_WINT_T@ && !defined wint_t
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
59 # define wint_t int
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 #endif
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
9960
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
63 Linux libc5 has <wctype.h> and the functions but they are broken.
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 Assume all 12 functions are implemented the same way, or not at all. */
9960
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
65 #if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 /* IRIX 5.3 has macros but no functions, its isw* macros refer to an
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 refer to system functions like _iswctype that are not in the
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 standard C library. Rather than try to get ancient buggy
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 implementations like this to work, just disable them. */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 # undef iswalnum
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 # undef iswalpha
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 # undef iswblank
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 # undef iswcntrl
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 # undef iswdigit
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 # undef iswgraph
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 # undef iswlower
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 # undef iswprint
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 # undef iswpunct
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 # undef iswspace
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 # undef iswupper
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 # undef iswxdigit
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84
9960
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
85 /* Linux libc5 has <wctype.h> and the functions but they are broken. */
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
86 # if @REPLACE_ISWCNTRL@
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
87 # define iswalnum rpl_iswalnum
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
88 # define iswalpha rpl_iswalpha
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
89 # define iswblank rpl_iswblank
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
90 # define iswcntrl rpl_iswcntrl
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
91 # define iswdigit rpl_iswdigit
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
92 # define iswgraph rpl_iswgraph
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
93 # define iswlower rpl_iswlower
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
94 # define iswprint rpl_iswprint
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
95 # define iswpunct rpl_iswpunct
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
96 # define iswspace rpl_iswspace
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
97 # define iswupper rpl_iswupper
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
98 # define iswxdigit rpl_iswxdigit
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
99 # endif
9f9682a4b630 Replace the isw* functions on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents: 9273
diff changeset
100
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
102 iswalnum (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 return ((wc >= '0' && wc <= '9')
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
109 iswalpha (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
115 iswblank (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 return wc == ' ' || wc == '\t';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
121 iswcntrl (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 return (wc & ~0x1f) == 0 || wc == 0x7f;
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
127 iswdigit (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
129 return wc >= '0' && wc <= '9';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
130 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
133 iswgraph (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
134 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 return wc >= '!' && wc <= '~';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
139 iswlower (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141 return wc >= 'a' && wc <= 'z';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
143
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
144 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
145 iswprint (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
146 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
147 return wc >= ' ' && wc <= '~';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
151 iswpunct (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 return (wc >= '!' && wc <= '~'
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 && !((wc >= '0' && wc <= '9')
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
157
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
159 iswspace (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 return (wc == ' ' || wc == '\t'
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
166 iswupper (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168 return wc >= 'A' && wc <= 'Z';
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
169 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 static inline int
10454
83d12e60b1e0 Ensure that wint_t gets defined on IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
172 iswxdigit (wint_t wc)
9273
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 {
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174 return ((wc >= '0' && wc <= '9')
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
176 }
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
177
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 # endif /* ! HAVE_ISWCNTRL */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 #endif /* _GL_WCTYPE_H */
7bb1d0d90657 Rename wctype_.h to wctype.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 #endif /* _GL_WCTYPE_H */