- Tabs to spaces.
[AROS.git] / workbench / libs / locale / loctoupper.c
blobd9653a6d14552f392079150cca5b9102c74449dd
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: LocToUpper - locale.library's private replacement
6 of utility.library/ToUper function. IPrefs will install
7 the patch.
9 Lang: english
12 #include <exec/types.h>
13 #include <proto/exec.h>
14 #include <proto/locale.h>
15 #include "locale_intern.h"
16 #include <aros/asmcall.h>
18 #define DEBUG_CONVTOUPPER(x) ;
20 /*****************************************************************************
22 NAME */
23 #include <proto/locale.h>
25 AROS_PLH1(ULONG, LocToUpper,
27 /* SYNOPSIS */
28 AROS_LHA(ULONG, character, D0),
30 /* LOCATION */
31 struct UtilityBase *, UtilityBase, 35, Locale)
33 /* FUNCTION
34 See utility.library/ToUpper
36 INPUTS
37 See utility.library/ToUpper
39 RESULT
41 NOTES
42 This function is not called by apps directly. Instead dos.library/DosGet-
43 LocalizedString is patched to use this function. This means, that the
44 LocaleBase parameter above actually points to UtilityBase, so we make use of
45 the global LocaleBase variable. This function is marked as private,
46 thus the headers generator won't mind the different basename in the header.
48 EXAMPLE
50 BUGS
52 SEE ALSO
53 utility.library/ToUpper(), locale.library/ConvToUpper().
55 INTERNALS
57 *****************************************************************************/
59 AROS_LIBFUNC_INIT
61 ULONG retval;
63 REPLACEMENT_LOCK;
65 DEBUG_CONVTOUPPER(dprintf("locToUpper: char 0x%lx\n", character));
67 DEBUG_CONVTOUPPER(dprintf("locToUpper: locale 0x%lx\n",
68 (struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale));
70 retval = ConvToUpper((struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale,
71 character);
73 DEBUG_CONVTOUPPER(dprintf("locToUpperr: retval 0x%lx\n", retval));
74 REPLACEMENT_UNLOCK;
76 return retval;
78 AROS_LIBFUNC_EXIT