Fix for the (stupid) case of app (always) passing
[tangerine.git] / rom / dos / dosgetstring.c
blobac81796f31bdce571fe23ca53357461fa97fbe51
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: DosGetString() - Support for localized strings.
6 Lang: english
7 */
9 #include "dos_intern.h"
11 /*****i***********************************************************************
13 NAME */
14 #include <proto/dos.h>
16 AROS_LH1(STRPTR, DosGetString,
18 /* SYNOPSIS */
19 AROS_LHA(LONG, stringNum, D0),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 163, Dos)
24 /* FUNCTION
25 Internal DOS function, will return the string corresponding to
26 the number stringNum.
28 INPUTS
29 stringNum - The number of the string you want.
31 RESULT
32 A pointer to a string, or NULL if no string could be found with
33 a matching number.
35 NOTES
36 Error strings will ALWAYS be less than 80 characters, and should
37 ideally be less than 60 characters.
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 DosGetLocalizedString()
46 INTERNALS
47 This is dosPrivate5()
49 ******************************************************************************/
51 AROS_LIBFUNC_INIT
52 AROS_LIBBASE_EXT_DECL(struct DosLibrary *, DOSBase)
54 STRPTR retval;
56 retval = DosGetLocalizedString(stringNum);
58 if (!retval)
60 struct EString *es = EString;
62 while(es->Number)
64 if(es->Number == stringNum)
66 retval = es->String;
67 break;
69 es++;
73 return retval;
75 AROS_LIBFUNC_EXIT
77 } /* DosGetString */