2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: IsXXXX() - Stub for Language isXXXXX() functions.
8 #include "locale_intern.h"
9 #include <aros/asmcall.h>
10 #include <proto/locale.h>
12 /*****************************************************************************
15 #include <proto/locale.h>
17 AROS_LH2(BOOL, IsXXXX,
20 AROS_LHA(const struct Locale *, locale, A0),
21 AROS_LHA(ULONG, character, D0),
24 struct LocaleBase *, LocaleBase, 0, Locale)
27 These functions allow you to find out whether a character
28 matches a certain type according to the current Locale
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
46 locale - The Locale to use for this function or NULL
47 for the system default locale.
48 character - the character to test
51 ind - An indication of whether the character matches the type.
52 TRUE - if the character is of the required type,
56 These functions require a 32-bit character to support future
57 multi-byte character sets.
67 *****************************************************************************/
70 AROS_LH2(ULONG
, IsAlNum
,
71 AROS_LHA(struct Locale
*, locale
, A0
),
72 AROS_LHA(ULONG
, character
, D0
),
73 struct LocaleBase
*, LocaleBase
, 14, Locale
)
78 struct Locale
*def_locale
= NULL
;
82 locale
= OpenLocale(NULL
);
87 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[4],
88 AROS_LCA(ULONG
, character
, D0
),
89 struct LocaleBase
*, LocaleBase
);
91 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[4],
92 AROS_UFCA(ULONG
, character
, D0
),
93 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
96 CloseLocale(def_locale
);
102 AROS_LH2(ULONG
, IsAlpha
,
103 AROS_LHA(struct Locale
*, locale
, A0
),
104 AROS_LHA(ULONG
, character
, D0
),
105 struct LocaleBase
*, LocaleBase
, 15, Locale
)
110 struct Locale
*def_locale
= NULL
;
114 locale
= OpenLocale(NULL
);
119 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[5],
120 AROS_LCA(ULONG
, character
, D0
),
121 struct LocaleBase
*, LocaleBase
);
123 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[5],
124 AROS_UFCA(ULONG
, character
, D0
),
125 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
128 CloseLocale(def_locale
);
134 AROS_LH2(ULONG
, IsCntrl
,
135 AROS_LHA(struct Locale
*, locale
, A0
),
136 AROS_LHA(ULONG
, character
, D0
),
137 struct LocaleBase
*, LocaleBase
, 16, Locale
)
142 struct Locale
*def_locale
= NULL
;
146 locale
= OpenLocale(NULL
);
151 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[6],
152 AROS_LCA(ULONG
, character
, D0
),
153 struct LocaleBase
*, LocaleBase
);
155 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[6],
156 AROS_UFCA(ULONG
, character
, D0
),
157 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
160 CloseLocale(def_locale
);
166 AROS_LH2(ULONG
, IsDigit
,
167 AROS_LHA(struct Locale
*, locale
, A0
),
168 AROS_LHA(ULONG
, character
, D0
),
169 struct LocaleBase
*, LocaleBase
, 17, Locale
)
174 struct Locale
*def_locale
= NULL
;
178 locale
= OpenLocale(NULL
);
183 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[7],
184 AROS_LCA(ULONG
, character
, D0
),
185 struct LocaleBase
*, LocaleBase
);
187 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[7],
188 AROS_UFCA(ULONG
, character
, D0
),
189 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
192 CloseLocale(def_locale
);
198 AROS_LH2(ULONG
, IsGraph
,
199 AROS_LHA(struct Locale
*, locale
, A0
),
200 AROS_LHA(ULONG
, character
, D0
),
201 struct LocaleBase
*, LocaleBase
, 18, Locale
)
206 struct Locale
*def_locale
= NULL
;
210 locale
= OpenLocale(NULL
);
215 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[8],
216 AROS_LCA(ULONG
, character
, D0
),
217 struct LocaleBase
*, LocaleBase
);
219 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[8],
220 AROS_UFCA(ULONG
, character
, D0
),
221 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
224 CloseLocale(def_locale
);
230 AROS_LH2(ULONG
, IsLower
,
231 AROS_LHA(struct Locale
*, locale
, A0
),
232 AROS_LHA(ULONG
, character
, D0
),
233 struct LocaleBase
*, LocaleBase
, 19, Locale
)
238 struct Locale
*def_locale
= NULL
;
242 locale
= OpenLocale(NULL
);
247 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[9],
248 AROS_LCA(ULONG
, character
, D0
),
249 struct LocaleBase
*, LocaleBase
);
251 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[9],
252 AROS_UFCA(ULONG
, character
, D0
),
253 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
256 CloseLocale(def_locale
);
262 AROS_LH2(ULONG
, IsPrint
,
263 AROS_LHA(struct Locale
*, locale
, A0
),
264 AROS_LHA(ULONG
, character
, D0
),
265 struct LocaleBase
*, LocaleBase
, 20, Locale
)
270 struct Locale
*def_locale
= NULL
;
274 locale
= OpenLocale(NULL
);
279 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[10],
280 AROS_LCA(ULONG
, character
, D0
),
281 struct LocaleBase
*, LocaleBase
);
283 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[10],
284 AROS_UFCA(ULONG
, character
, D0
),
285 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
288 CloseLocale(def_locale
);
294 AROS_LH2(ULONG
, IsPunct
,
295 AROS_LHA(struct Locale
*, locale
, A0
),
296 AROS_LHA(ULONG
, character
, D0
),
297 struct LocaleBase
*, LocaleBase
, 21, Locale
)
302 struct Locale
*def_locale
= NULL
;
306 locale
= OpenLocale(NULL
);
311 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[11],
312 AROS_LCA(ULONG
, character
, D0
),
313 struct LocaleBase
*, LocaleBase
);
315 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[11],
316 AROS_UFCA(ULONG
, character
, D0
),
317 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
320 CloseLocale(def_locale
);
326 AROS_LH2(ULONG
, IsSpace
,
327 AROS_LHA(struct Locale
*, locale
, A0
),
328 AROS_LHA(ULONG
, character
, D0
),
329 struct LocaleBase
*, LocaleBase
, 22, Locale
)
334 struct Locale
*def_locale
= NULL
;
338 locale
= OpenLocale(NULL
);
343 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[12],
344 AROS_LCA(ULONG
, character
, D0
),
345 struct LocaleBase
*, LocaleBase
);
347 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[12],
348 AROS_UFCA(ULONG
, character
, D0
),
349 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
352 CloseLocale(def_locale
);
358 AROS_LH2(ULONG
, IsUpper
,
359 AROS_LHA(struct Locale
*, locale
, A0
),
360 AROS_LHA(ULONG
, character
, D0
),
361 struct LocaleBase
*, LocaleBase
, 23, Locale
)
366 struct Locale
*def_locale
= NULL
;
370 locale
= OpenLocale(NULL
);
375 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[13],
376 AROS_LCA(ULONG
, character
, D0
),
377 struct LocaleBase
*, LocaleBase
);
379 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[13],
380 AROS_UFCA(ULONG
, character
, D0
),
381 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
384 CloseLocale(def_locale
);
390 AROS_LH2(ULONG
, IsXDigit
,
391 AROS_LHA(struct Locale
*, locale
, A0
),
392 AROS_LHA(ULONG
, character
, D0
),
393 struct LocaleBase
*, LocaleBase
, 24, Locale
)
398 struct Locale
*def_locale
= NULL
;
402 locale
= OpenLocale(NULL
);
407 retval
= AROS_CALL1(BOOL
, IntL(locale
)->il_LanguageFunctions
[14],
408 AROS_LCA(ULONG
, character
, D0
),
409 struct LocaleBase
*, LocaleBase
);
411 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[14],
412 AROS_UFCA(ULONG
, character
, D0
),
413 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
416 CloseLocale(def_locale
);