summaryrefslogtreecommitdiffstats
path: root/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'args.c')
-rw-r--r--args.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/args.c b/args.c
index aa2139a7..c93d8108 100644
--- a/args.c
+++ b/args.c
@@ -117,6 +117,17 @@ struct args *args_cat_zap_from(struct args *to, struct args *from, cnum index)
return to;
}
+struct args *args_copy_reverse(struct args *to, struct args *from, cnum nargs)
+{
+ cnum i, index = 0;
+
+ for (i = nargs - 1; i >= 0; i--)
+ to->arg[i] = args_get(from, &index);
+
+ to->fill = nargs;
+ return to;
+}
+
val args_copy_to_list(struct args *args)
{
list_collect_decl (out, ptail);