From 26fcfcd8b210c414c51ee6e424c33277dd2a1f81 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Mon, 5 May 2003 07:09:35 +0000 Subject: [PATCH] Merged arguments of VM and scsh. Non-backward comptaible changes: -o for specifying the object file is gone -i does not terminate argument scanning -s for specifying the size of the stack is now -stacksize --- Makefile.in | 8 +- build/build-usual-image | 2 +- c/main.c | 16 ++-- scsh/process_args.c | 178 +++++++++++++++++++++++++++------------- scsh/top.scm | 9 ++ 5 files changed, 141 insertions(+), 72 deletions(-) diff --git a/Makefile.in b/Makefile.in index 312749f..dafc7b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -378,7 +378,7 @@ inst-script: echo '#!/bin/sh' >$$script && \ echo >>$$script && \ echo 'lib=$(LIB)' >>$$script && \ - echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \ + echo 'exec $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \ >>$$script && \ chmod +x $$script @@ -387,7 +387,7 @@ go: echo '#!/bin/sh' >$@ && \ echo >>$@ && \ echo "lib=`pwd`" >>$@ && \ - echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/scsh/scsh.image "$$@"' \ + echo 'exec $$lib/$(VM) -i $$lib/scsh/scsh.image "$$@"' \ >>$@ && \ chmod +x $@ @@ -832,7 +832,7 @@ scsh/scsh.image: $(VM) $(SCHEME) $(IMAGE) echo ",open $(opens)"; \ echo "(dump-scsh \"$@\")"; \ ) \ - | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000 + | ./$(VM) -i $(IMAGE) -h 10000000 # ,flush files => 0k # ,flush names => -= 17k @@ -847,7 +847,7 @@ scsh/stripped-scsh.image: $(VM) $(SCHEME) $(IMAGE) echo ",open $(opens)"; \ echo ",flush"; \ echo "(dump-scsh \"$@\")";) \ - | ./$(VM) -o ./$(VM) -i $(IMAGE) -h 10000000 + | ./$(VM) -i $(IMAGE) -h 10000000 install-scsh: scsh install-scsh-image install-stripped-scsh-image $(RM) $(bindir)/$(RUNNABLE) diff --git a/build/build-usual-image b/build/build-usual-image index 8af1c43..316167b 100755 --- a/build/build-usual-image +++ b/build/build-usual-image @@ -9,7 +9,7 @@ vm=$4 initial=$5 USER=${USER-`logname 2>/dev/null || echo '*GOK*'`} -./$vm -o ./$vm -i $initial batch < #include - -extern char *prog_name; +#include #define streq(a,b) (strcmp((a),(b))==0) static void usage(void) { - fprintf(stderr, "Usage: %s [meta-arg] [vm-option+] [end-option scheme-args]\n" - "meta-arg: \\