Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / locale / getlocalestr.c
blob802b6e1268afb689b8ee691e462a7f8024322320
1 /*
2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: GetLocaleStr() - Get a built-in system string.
6 Lang: english
7 */
8 #include <exec/types.h>
9 #include <proto/exec.h>
10 #include "locale_intern.h"
11 #include <aros/asmcall.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/locale.h>
18 AROS_LH2(CONST_STRPTR, GetLocaleStr,
20 /* SYNOPSIS */
21 AROS_LHA(const struct Locale *, locale, A0),
22 AROS_LHA(ULONG , stringNum, D0),
24 /* LOCATION */
25 struct LocaleBase *, LocaleBase, 13, Locale)
27 /* FUNCTION
28 This function will return a system standard string from
29 the current Locale.
31 INPUTS
32 locale - The current locale.
33 stringNum - The number of the string to get a pointer to.
34 See the include file <libraries/locale.h>
35 for a list of possible values.
37 RESULT
38 A pointer to a NULL-terminated string, or NULL if the string
39 requested was unknown. The returned string is READ-ONLY and
40 is valid only as long as the Locale remains open.
42 NOTES
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 #ifdef AROS_CALL1
57 return AROS_CALL1(CONST_STRPTR, IntL(locale)->il_LanguageFunctions[3],
58 AROS_LCA(ULONG, stringNum, D0),
59 struct LocaleBase *, LocaleBase);
60 #else
61 return AROS_UFC2(CONST_STRPTR, IntL(locale)->il_LanguageFunctions[3],
62 AROS_UFCA(ULONG, stringNum, D0),
63 AROS_UFCA(struct LocaleBase *, LocaleBase, A6));
64 #endif
66 AROS_LIBFUNC_EXIT
67 } /* GetLocaleStr */