revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / locale / convtoupper.c
blobcf4eb8c3289348ffcd20aea4f3a4d69c88e307b9
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ConvToUpper() - stub for the language toupper() function.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include "locale_intern.h"
11 #include <aros/asmcall.h>
13 #define DEBUG_CONVTOUPPER(x) ;
15 /*****************************************************************************
17 NAME */
18 #include <proto/locale.h>
20 AROS_LH2(ULONG, ConvToUpper,
22 /* SYNOPSIS */
23 AROS_LHA(const struct Locale *, locale, A0),
24 AROS_LHA(ULONG , character, D0),
26 /* LOCATION */
27 struct LocaleBase *, LocaleBase, 9, Locale)
29 /* FUNCTION
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.
34 INPUTS
35 locale - The Locale to use for this conversion or NULL for
36 the system default locale.
37 character - The character to convert.
39 RESULT
40 The possibly converted character.
42 NOTES
43 This function requires a full 32-bit character in order to support
44 future multi-byte character sets.
46 EXAMPLE
48 BUGS
50 SEE ALSO
51 ConvToLower()
53 INTERNALS
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 ULONG retval;
60 struct Locale *def_locale = NULL;
62 if (locale == NULL)
64 locale = OpenLocale(NULL);
65 def_locale = (struct Locale *)locale;
68 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: locale 0x%lx char 0x%lx\n",
69 locale, character));
71 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: func 0x%lx\n",
72 IntL(locale)->il_LanguageFunctions[1]));
74 #ifdef AROS_CALL1
75 retval = AROS_CALL1(ULONG, IntL(locale)->il_LanguageFunctions[1],
76 AROS_LCA(ULONG, character, D0), struct LocaleBase *, LocaleBase);
77 #else
78 retval = AROS_UFC2(ULONG, IntL(locale)->il_LanguageFunctions[1],
79 AROS_UFCA(ULONG, character, D0),
80 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
81 #endif
83 DEBUG_CONVTOUPPER(dprintf("ConvToUpper: retval 0x%lx\n", retval));
85 CloseLocale(def_locale);
87 return retval;
89 AROS_LIBFUNC_EXIT