2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: ConvToLower() - Stub for the Language tolower() function.
8 #include <exec/types.h>
9 #include "locale_intern.h"
10 #include <aros/asmcall.h>
12 #define DEBUG_CONVTOLOWER(x) ;
14 /*****************************************************************************
17 #include <proto/locale.h>
19 AROS_LH2(ULONG
, ConvToLower
,
22 AROS_LHA(const struct Locale
*, locale
, A0
),
23 AROS_LHA(ULONG
, character
, D0
),
26 struct LocaleBase
*, LocaleBase
, 8, Locale
)
29 This function determine if the character supplied is upper case,
30 and if it is, the character will be converted to lower case.
31 Otherwise, the original character will be returned.
34 locale - The Locale to use for this conversion or NULL for
35 the system default locale.
36 character - The character to convert to lower case.
39 The possibly converted character.
42 This function requires a full 32-bit character in order to
43 support future multi-byte character sets.
53 *****************************************************************************/
58 struct Locale
*def_locale
= NULL
;
62 locale
= OpenLocale(NULL
);
63 def_locale
= (struct Locale
*)locale
;
66 DEBUG_CONVTOLOWER(dprintf("ConvToLower: locale 0x%lx char 0x%lx\n",
69 DEBUG_CONVTOLOWER(dprintf("ConvToLower: func 0x%lx\n",
70 IntL(locale
)->il_LanguageFunctions
[0]));
73 retval
= AROS_CALL1(ULONG
, IntL(locale
)->il_LanguageFunctions
[0],
74 AROS_LCA(ULONG
, character
, D0
), struct LocaleBase
*, LocaleBase
);
76 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[0],
77 AROS_UFCA(ULONG
, character
, D0
),
78 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
81 DEBUG_CONVTOLOWER(dprintf("ConvToLower: retval 0x%lx\n", retval
));
83 CloseLocale(def_locale
);