summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-09 07:51:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-09 07:51:47 -0700
commit7301f71181073b0567fa9aa285cff58b7653a67d (patch)
tree5cfdb2fbd3efe1dbbda22d51b5bff3cbceb3fd9d /txr.c
parent7660e90e5815154df9ddf5d8f2b52031e7956557 (diff)
downloadtxr-7301f71181073b0567fa9aa285cff58b7653a67d.tar.gz
txr-7301f71181073b0567fa9aa285cff58b7653a67d.tar.bz2
txr-7301f71181073b0567fa9aa285cff58b7653a67d.zip
* txr.c (txr_main): New option --args.
Also, put in missing check for -f being erroneously clumped. * txr.1: Documented.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 9b84aabb..27fbb353 100644
--- a/txr.c
+++ b/txr.c
@@ -209,6 +209,13 @@ int txr_main(int argc, char **argv)
if (equal(arg, lit("-")))
break;
+ if (match_str(arg, lit("--args"), zero) && ge(length(arg), num(7))) {
+ val sep = sub_str(arg, num(6), num(7));
+ arg = sub_str(arg, num(7), nil);
+ arg_list = append2(split_str(arg, sep), arg_list);
+ continue;
+ }
+
if (equal(sub(arg, zero, two), lit("-D"))) {
val dopt_arg = sub(arg, two, t);
cons_bind(var, def, split_str(dopt_arg, lit("=")));
@@ -355,6 +362,7 @@ int txr_main(int argc, char **argv)
case 'c':
case 'e':
case 'p':
+ case 'f':
case 'D':
format(std_error, lit("~a: option -~a does not clump\n"),
prog_string, opch, nao);