Belarusian
[AROS.git] / rom / dos / setargstr.c
blob159172e36099c6796100810b46a2cc76acdb22dd
1 /*
2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "dos_intern.h"
9 #include <dos/dosextens.h>
10 #include <proto/exec.h>
12 /*****************************************************************************
14 NAME */
15 #include <proto/dos.h>
17 AROS_LH1(STRPTR, SetArgStr,
19 /* SYNOPSIS */
20 AROS_LHA(CONST_STRPTR, string, D1),
22 /* LOCATION */
23 struct DosLibrary *, DOSBase, 90, Dos)
25 /* FUNCTION
26 Sets the arguments to the current process. The arguments must be
27 reset to the original value before process exit.
29 INPUTS
30 string - The new argument string. (A C string).
32 RESULT
33 The address of the previous argument string. May be NULL.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 GetArgStr(), RunCommand()
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 STRPTR oldStr;
51 struct Process *pr = (struct Process *)FindTask(NULL);
52 oldStr = pr->pr_Arguments;
53 pr->pr_Arguments = (STRPTR)string;
55 return oldStr;
57 AROS_LIBFUNC_EXIT
58 } /* SetArgStr */