7 #include "shell_defs.h"
8 #include "shell_vars.h"
10 bool af_exit_after_script
;
11 char *af_script_file_name
;
14 static void handle_option(char *option
){
17 case 's':// setup script
19 af_exit_after_script
= false;
24 printf("unknown option : %s\n",option
);
27 void init_arguments(int argc
,char **argv
){
33 af_exit_after_script
= true;
34 af_script_file_name
= NULL
;
36 while((cnt
< argc
) && (argv
[cnt
][0] == '-')){
37 handle_option(argv
[cnt
]);
43 af_script_file_name
= argv
[cnt
];
48 sprintf(name
,NAME_PAR_PRFX
,cnt
-1);
49 shell_var_set_text(name
,argv
[cnt
]);
54 shell_var_set_number(NAME_VAR_ARGC
,shell_argc
);