grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / locale / isxxxx.c
blob77c3be5eaefa8feb83d8d3acc4659926ef5c6af8
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: IsXXXX() - Stub for Language isXXXXX() functions.
6 Lang: english
7 */
8 #include "locale_intern.h"
9 #include <aros/asmcall.h>
10 #include <proto/locale.h>
12 /*****************************************************************************
14 NAME
15 #include <proto/locale.h>
17 AROS_LH2(BOOL, IsXXXX,
19 SYNOPSIS
20 AROS_LHA(const struct Locale *, locale, A0),
21 AROS_LHA(ULONG, character, D0),
23 LOCATION
24 struct LocaleBase *, LocaleBase, 0, Locale)
26 FUNCTION
27 These functions allow you to find out whether a character
28 matches a certain type according to the current Locale
29 settings.
31 The functions available are:
33 IsAlNum() - is this an alphanumeric character
34 IsAlpha() - is this an alphabet character
35 IsCntrl() - is this a control character
36 IsDigit() - is this a decimal digit character
37 IsGraph() - is this a graphical character
38 IsLower() - is this a lowercase character
39 IsPrint() - is this a printable character
40 IsPunct() - is this a punctuation character
41 IsSpace() - is this a whitespace character
42 IsUpper() - is this an uppercase character
43 IsXDigit() - is this a hexadecimal digit
45 INPUTS
46 locale - The Locale to use for this function.
47 character - the character to test
49 RESULT
50 ind - An indication of whether the character matches the type.
51 TRUE - if the character is of the required type,
52 FALSE - otherwise
54 NOTES
55 The Locale MUST be supplied.
57 These functions require a 32-bit character to support future
58 multi-byte character sets.
60 EXAMPLE
62 BUGS
64 SEE ALSO
66 INTERNALS
68 *****************************************************************************/
71 AROS_LH2(ULONG, IsAlNum,
72 AROS_LHA(struct Locale *, locale, A0),
73 AROS_LHA(ULONG , character, D0),
74 struct LocaleBase *, LocaleBase, 14, Locale)
76 AROS_LIBFUNC_INIT
78 #ifdef AROS_CALL1
79 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[4],
80 AROS_LCA(ULONG, character, D0),
81 struct LocaleBase *, LocaleBase);
82 #else
83 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[4],
84 AROS_UFCA(ULONG, character, D0),
85 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
86 #endif
88 AROS_LIBFUNC_EXIT
89 } /* IsAlNum */
91 AROS_LH2(ULONG, IsAlpha,
92 AROS_LHA(struct Locale *, locale, A0),
93 AROS_LHA(ULONG , character, D0),
94 struct LocaleBase *, LocaleBase, 15, Locale)
96 AROS_LIBFUNC_INIT
98 #ifdef AROS_CALL1
99 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[5],
100 AROS_LCA(ULONG, character, D0),
101 struct LocaleBase *, LocaleBase);
102 #else
103 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[5],
104 AROS_UFCA(ULONG, character, D0),
105 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
106 #endif
108 AROS_LIBFUNC_EXIT
109 } /* IsAlpha */
111 AROS_LH2(ULONG, IsCntrl,
112 AROS_LHA(struct Locale *, locale, A0),
113 AROS_LHA(ULONG , character, D0),
114 struct LocaleBase *, LocaleBase, 16, Locale)
116 AROS_LIBFUNC_INIT
118 #ifdef AROS_CALL1
119 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[6],
120 AROS_LCA(ULONG, character, D0),
121 struct LocaleBase *, LocaleBase);
122 #else
123 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[6],
124 AROS_UFCA(ULONG, character, D0),
125 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
126 #endif
128 AROS_LIBFUNC_EXIT
129 } /* IsCntrl */
131 AROS_LH2(ULONG, IsDigit,
132 AROS_LHA(struct Locale *, locale, A0),
133 AROS_LHA(ULONG , character, D0),
134 struct LocaleBase *, LocaleBase, 17, Locale)
136 AROS_LIBFUNC_INIT
138 #ifdef AROS_CALL1
139 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[7],
140 AROS_LCA(ULONG, character, D0),
141 struct LocaleBase *, LocaleBase);
142 #else
143 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[7],
144 AROS_UFCA(ULONG, character, D0),
145 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
146 #endif
148 AROS_LIBFUNC_EXIT
149 } /* IsDigit */
151 AROS_LH2(ULONG, IsGraph,
152 AROS_LHA(struct Locale *, locale, A0),
153 AROS_LHA(ULONG , character, D0),
154 struct LocaleBase *, LocaleBase, 18, Locale)
156 AROS_LIBFUNC_INIT
158 #ifdef AROS_CALL1
159 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[8],
160 AROS_LCA(ULONG, character, D0),
161 struct LocaleBase *, LocaleBase);
162 #else
163 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[8],
164 AROS_UFCA(ULONG, character, D0),
165 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
166 #endif
168 AROS_LIBFUNC_EXIT
169 } /* IsGraph */
171 AROS_LH2(ULONG, IsLower,
172 AROS_LHA(struct Locale *, locale, A0),
173 AROS_LHA(ULONG , character, D0),
174 struct LocaleBase *, LocaleBase, 19, Locale)
176 AROS_LIBFUNC_INIT
178 #ifdef AROS_CALL1
179 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[9],
180 AROS_LCA(ULONG, character, D0),
181 struct LocaleBase *, LocaleBase);
182 #else
183 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[9],
184 AROS_UFCA(ULONG, character, D0),
185 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
186 #endif
188 AROS_LIBFUNC_EXIT
189 } /* IsLower */
191 AROS_LH2(ULONG, IsPrint,
192 AROS_LHA(struct Locale *, locale, A0),
193 AROS_LHA(ULONG , character, D0),
194 struct LocaleBase *, LocaleBase, 20, Locale)
196 AROS_LIBFUNC_INIT
198 #ifdef AROS_CALL1
199 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[10],
200 AROS_LCA(ULONG, character, D0),
201 struct LocaleBase *, LocaleBase);
202 #else
203 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[10],
204 AROS_UFCA(ULONG, character, D0),
205 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
206 #endif
208 AROS_LIBFUNC_EXIT
209 } /* IsPrint */
211 AROS_LH2(ULONG, IsPunct,
212 AROS_LHA(struct Locale *, locale, A0),
213 AROS_LHA(ULONG , character, D0),
214 struct LocaleBase *, LocaleBase, 21, Locale)
216 AROS_LIBFUNC_INIT
218 #ifdef AROS_CALL1
219 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[11],
220 AROS_LCA(ULONG, character, D0),
221 struct LocaleBase *, LocaleBase);
222 #else
223 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[11],
224 AROS_UFCA(ULONG, character, D0),
225 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
226 #endif
228 AROS_LIBFUNC_EXIT
229 } /* IsPunct */
231 AROS_LH2(ULONG, IsSpace,
232 AROS_LHA(struct Locale *, locale, A0),
233 AROS_LHA(ULONG , character, D0),
234 struct LocaleBase *, LocaleBase, 22, Locale)
236 AROS_LIBFUNC_INIT
238 #ifdef AROS_CALL1
239 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[12],
240 AROS_LCA(ULONG, character, D0),
241 struct LocaleBase *, LocaleBase);
242 #else
243 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[12],
244 AROS_UFCA(ULONG, character, D0),
245 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
246 #endif
248 AROS_LIBFUNC_EXIT
249 } /* IsSpace */
251 AROS_LH2(ULONG, IsUpper,
252 AROS_LHA(struct Locale *, locale, A0),
253 AROS_LHA(ULONG , character, D0),
254 struct LocaleBase *, LocaleBase, 23, Locale)
256 AROS_LIBFUNC_INIT
258 #ifdef AROS_CALL1
259 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[13],
260 AROS_LCA(ULONG, character, D0),
261 struct LocaleBase *, LocaleBase);
262 #else
263 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[13],
264 AROS_UFCA(ULONG, character, D0),
265 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
266 #endif
268 AROS_LIBFUNC_EXIT
269 } /* IsUpper */
271 AROS_LH2(ULONG, IsXDigit,
272 AROS_LHA(struct Locale *, locale, A0),
273 AROS_LHA(ULONG , character, D0),
274 struct LocaleBase *, LocaleBase, 24, Locale)
276 AROS_LIBFUNC_INIT
278 #ifdef AROS_CALL1
279 return AROS_CALL1(BOOL, IntL(locale)->il_LanguageFunctions[14],
280 AROS_LCA(ULONG, character, D0),
281 struct LocaleBase *, LocaleBase);
282 #else
283 return AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[14],
284 AROS_UFCA(ULONG, character, D0),
285 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
286 #endif
288 AROS_LIBFUNC_EXIT
289 } /* IsXDigit */