diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-25 16:21:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-25 16:21:55 +0300 |
commit | 39e1ad85f7fb63156621112a28a876265d9fa1f0 (patch) | |
tree | 3607cb92f570680bb6c2016018e373834edd8b3d /src/cmdline.opt | |
parent | c6230a46e93e9fb1525d5a036074aa7b5ff8a76e (diff) | |
download | idest-39e1ad85f7fb63156621112a28a876265d9fa1f0.tar.gz idest-39e1ad85f7fb63156621112a28a876265d9fa1f0.tar.bz2 |
Implement --batch option (a generalization of --format).
* NEWS: Update
* doc/idest.texi: Update.
* scheme/Makefile.am (EXTRA_DIST,site_DATA): Add batch.scm
(dist-hook): Exclude backup files.
* scheme/batch.scm: New file.
* scheme/idest/batch/help.scm: New file.
* scheme/idest/format/help.scm: Use list-modules.
* scheme/idest/format/shortlist.scm: Fix typo.
* scheme/idest/list-modules.scm: New file (from scheme/idest/format/help.scm).
* src/cmdline.opt: Remove the --function option.
New option --batch.
* src/guile.c (guile_function,guile_script): Remove.
(load_closure): Remove struct.
(load_handler,load_handler_path): data points to char **.
(guile_load): Change signature: filename is superfluous, use argv[0]
instead. All callers updated.
* src/idest.h (ed_list,guile_script,guile_function): Remove.
* src/main.c (dry_run_option,batch_name): New variables.
(set_guile_argv): New function.
(main): Handle batch_name and dry_run_option.
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r-- | src/cmdline.opt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt index f2d891d..0043164 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt @@ -184,8 +184,8 @@ GROUP([<Scripting options>]) OPTION(script,S,FILE, [<read Guile script from FILE; this stops further argument processing>]) BEGIN - guile_script = optarg; - guile_argv = argv + optind; /* Save rest of arguments */ + set_guile_argv(argc - optind, argv + optind); /* Save rest of arguments */ + *--guile_argv = optarg; optind = argc; /* Stop argument processing */ END @@ -196,10 +196,17 @@ BEGIN stop = 1; /* Stop argument processing */ END -OPTION(function,f,NAME, - [<guile function to call>]) +OPTION(batch,B,NAME, + [<apply batch modification module NAME; this stops further argument processing>]) BEGIN - guile_function = optarg; + batch_name = optarg; + stop = 1; /* Stop argument processing */ +END + +OPTION(dry-run,n,, + [<run the script, print modified frames but do not write them to the file>]) +BEGIN + dry_run_option = 1; END OPTION(trace,,[LEVEL], |