2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: ConvToUpper() - stub for the language toupper() function.
9 #include <exec/types.h>
10 #include "locale_intern.h"
11 #include <aros/asmcall.h>
13 #define DEBUG_CONVTOUPPER(x) ;
15 /*****************************************************************************
18 #include <proto/locale.h>
20 AROS_LH2(ULONG
, ConvToUpper
,
23 AROS_LHA(const struct Locale
*, locale
, A0
),
24 AROS_LHA(ULONG
, character
, D0
),
27 struct LocaleBase
*, LocaleBase
, 9, Locale
)
30 ConvToUpper() will determine if a character is a lower case
31 character and if so convert it to the upper case equivalent.
32 Otherwise it will return the original character.
35 locale - The Locale to use for this conversion or NULL for
36 the system default locale.
37 character - The character to convert.
40 The possibly converted character.
43 This function requires a full 32-bit character in order to support
44 future multi-byte character sets.
55 *****************************************************************************/
60 struct Locale
*def_locale
= NULL
;
64 locale
= OpenLocale(NULL
);
65 def_locale
= (struct Locale
*)locale
;
68 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: locale 0x%lx char 0x%lx\n",
71 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: func 0x%lx\n",
72 IntL(locale
)->il_LanguageFunctions
[1]));
75 retval
= AROS_CALL1(ULONG
, IntL(locale
)->il_LanguageFunctions
[1],
76 AROS_LCA(ULONG
, character
, D0
), struct LocaleBase
*, LocaleBase
);
78 retval
= AROS_UFC2(ULONG
, IntL(locale
)->il_LanguageFunctions
[1],
79 AROS_UFCA(ULONG
, character
, D0
),
80 AROS_UFCA(struct LocaleBase
*, LocaleBase
, A6
));
83 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: retval 0x%lx\n", retval
));
85 CloseLocale(def_locale
);