correct copyright
[AROS.git] / rom / dos / setargstr.c
blob00953851746bd26251513f4c39cd8a06669e9a97
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <dos/dosextens.h>
12 #include <proto/exec.h>
14 /*****************************************************************************
16 NAME */
17 #include <proto/dos.h>
19 AROS_LH1(STRPTR, SetArgStr,
21 /* SYNOPSIS */
22 AROS_LHA(CONST_STRPTR, string, D1),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 90, Dos)
27 /* FUNCTION
28 Sets the arguments to the current process. The arguments must be
29 reset to the original value before process exit.
31 INPUTS
32 string - The new argument string (a C string).
34 RESULT
35 The address of the previous argument string. May be NULL.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 GetArgStr(), RunCommand()
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 STRPTR oldStr;
53 struct Process *pr = (struct Process *)FindTask(NULL);
54 ASSERT_VALID_PROCESS(pr);
55 oldStr = pr->pr_Arguments;
56 pr->pr_Arguments = (STRPTR)string;
58 return oldStr;
60 AROS_LIBFUNC_EXIT
61 } /* SetArgStr */