revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / locale / locstricmp.c
blob786bd97b73c8d8499855cb22cb9f1d9afb4327db
1 /*
2 Copyright © 1995-2011, 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 *****************************************************************************/
60 AROS_LIBFUNC_INIT
62 LONG retval;
64 REPLACEMENT_LOCK;
66 DEBUG_STRCMP(dprintf("locStrCmp: <%s> <%s>\n", string1, string2));
68 DEBUG_STRCMP(dprintf("locStrCmp: CurrentLocale 0x%lx\n",
69 (struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale));
71 retval = StrnCmp((struct Locale *)IntLB(LocaleBase)->lb_CurrentLocale,
72 (STRPTR) string1, (STRPTR) string2, -1, SC_ASCII);
74 DEBUG_STRCMP(dprintf("StrCmp: retval 0x%lx\n", retval));
76 REPLACEMENT_UNLOCK;
78 return retval;
80 AROS_LIBFUNC_EXIT