summaryrefslogtreecommitdiff
path: root/extlibs/arg.c
diff options
context:
space:
mode:
Diffstat (limited to 'extlibs/arg.c')
-rw-r--r--extlibs/arg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/extlibs/arg.c b/extlibs/arg.c
index 3d4475b..7a34641 100644
--- a/extlibs/arg.c
+++ b/extlibs/arg.c
@@ -203,9 +203,11 @@ arg_t* arg_load( int argc, char **argv, def_arg *argl )
{
ENL();
}
+
argl[pos].used = 1;
+ ((s_arg_list *)argl[pos].def)->result = list;
used[i] = 1;
used[i+1] = 1;
@@ -236,12 +238,12 @@ arg_t* arg_load( int argc, char **argv, def_arg *argl )
//if (((s_arg_val*)argl[pos].def)->ptr != NULL)
// val->def = 0;
- //val->used = 1;
val->ptr = argv[i+1];
__add_arg( ret, ARGT_VAL, val );
//set that requied option allready where at cmd
argl[pos].used = 1;
+ ((s_arg_val *)argl[pos].def)->result = val;
//set used cmd arg
used[i ] = 1;
@@ -266,13 +268,17 @@ arg_t* arg_load( int argc, char **argv, def_arg *argl )
flg = __create_arg( argl[pos].type, argl[pos].def );
- //flg->used = 1;
flg->flag = 1;
__add_arg( ret, ARGT_FLAG, flg );
+
argl[pos].used = 1;
+ ((s_arg_flag *)argl[pos].def)->result = flg;
+
+ printf("result = ?\n");
+
used[i] = 1;
break;