revert between 56095 -> 55830 in arch
[AROS.git] / workbench / prefs / network / args.c
blob8051b37b507a23e37f3b65afd0d1f6390c664ef7
1 /*
2 Copyright © 2009-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/rdargs.h>
7 #include <proto/dos.h>
9 #include "args.h"
11 /*** Global Variables *******************************************************/
12 STATIC CONST_STRPTR TEMPLATE = "FROM,USE/S,SAVE/S";
13 STATIC IPTR args[COUNT];
14 STATIC struct RDArgs *rdargs;
16 /*** Functions **************************************************************/
17 BOOL ReadArguments(int argc, char **argv)
19 if (argc != 0) // started from Shell
21 rdargs = ReadArgs(TEMPLATE, args, NULL);
22 return rdargs != NULL;
24 return TRUE;
27 VOID FreeArguments(VOID)
29 FreeArgs(rdargs); // safe to use with NULL.
32 IPTR GetArgument(enum Argument id)
34 if (id >= 0 && id < COUNT) return args[id];
35 else return 0;