Do not try to get stack pointer from invalid ESP field, which coincidentally
[AROS.git] / rom / dos / getargstr.c
blob358d9cba5e5ab449e4ada179d0c4afccaca84a53
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/dos.h>
16 AROS_LH0(STRPTR, GetArgStr,
18 /* SYNOPSIS */
20 /* LOCATION */
21 struct DosLibrary *, DOSBase, 89, Dos)
23 /* FUNCTION
24 Returns a pointer to the argument string passed to the current
25 process at startup.
27 INPUTS
29 RESULT
30 Pointer to argument string.
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 *****************************************************************************/
44 AROS_LIBFUNC_INIT
46 /* Get pointer to process structure */
47 struct Process *me=(struct Process *)FindTask(NULL);
49 /* Nothing spectacular */
50 return me->pr_Arguments;
51 AROS_LIBFUNC_EXIT
52 } /* GetArgStr */