add casts to zune macros to silence some warnings
[tangerine.git] / workbench / libs / locale / locstricmp.c
blob9b5d2960a2687fb67a25549451c683c7330c995d
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: LocStricmp - locale.library's private replacement
6 of utility.library/Stricmp 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_STRCMP(x) ;
20 /*****************************************************************************
22 NAME */
23 #include <proto/locale.h>
25 AROS_PLH2(LONG, LocStricmp,
27 /* SYNOPSIS */
28 AROS_LHA(CONST_STRPTR, string1, A0),
29 AROS_LHA(CONST_STRPTR, string2, A1),
31 /* LOCATION */
32 struct UtilityBase *, UtilityBase, 33, Locale)
34 /* FUNCTION
35 See utility.library/Stricmp
37 INPUTS
38 See utility.library/Stricmp
40 RESULT
42 NOTES
43 This function is not called by apps directly. Instead dos.library/DosGet-
44 LocalizedString is patched to use this function. This means, that the
45 LocaleBase parameter above actually points to UtilityBase, so we make use of
46 the global LocaleBase variable. This function is marked as private,
47 thus the headers generator won't mind the different basename in the header.
49 EXAMPLE
51 BUGS
53 SEE ALSO
54 utility.library/Stricmp(), locale.library/StrnCmp().
56 INTERNALS
58 HISTORY
60 *****************************************************************************/
62 AROS_LIBFUNC_INIT
64 LONG retval;
66 REPLACEMENT_LOCK;
68 DEBUG_STRCMP(dprintf("locStrCmp: <%s> <%s>\n",
69 string1,
70 string2));
72 DEBUG_STRCMP(dprintf("locStrCmp: CurrentLocale 0x%lx\n",
73 (struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale));
75 retval = StrnCmp((struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale,
76 (STRPTR)string1,
77 (STRPTR)string2,
78 -1,
79 SC_ASCII);
81 DEBUG_STRCMP(dprintf("StrCmp: retval 0x%lx\n",
82 retval));
84 REPLACEMENT_UNLOCK;
86 return retval;
88 AROS_LIBFUNC_EXIT
90 } /* LocStricmp */