diff --git a/Makefile b/Makefile index d671b23..d1e1edb 100644 --- a/Makefile +++ b/Makefile @@ -111,10 +111,11 @@ SCSHVMHACKS = scsh/proc2.o #JMG: and it's object files #JMG left out: scsh/re.o scsh/re1.o scsh/regexp/regexp.o scsh/regexp/regsub.o -# scsh/fdports1.o -# scsh/rdelim.o +# +# SCSHOBJS = \ scsh/dirstuff1.o \ + scsh/fdports1.o \ scsh/flock.o scsh/flock1.o \ scsh/machine/stdio_dep.o \ scsh/machine/time_dep1.o \ @@ -122,6 +123,7 @@ SCSHOBJS = \ scsh/machine/libansi.o \ scsh/network.o scsh/network1.o \ scsh/putenv.o \ + scsh/rdelim.o \ scsh/rx/re-low.o scsh/rx/re1.o \ scsh/select.o scsh/select1.o \ scsh/sleep1.o \ @@ -158,8 +160,8 @@ enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) # External code to include in the VM # After changing any of these you should delete `scheme48vm' and remake it. -CIGGED = flock network select syscalls tty time sighandlers re_low -#re rdelim +CIGGED = flock network select syscalls tty time sighandlers re_low rdelim +#re CIGGEDOBJ = $(patsubst %,scsh/%.o, $(CIGGED)) CIGGEDINIT = $(patsubst %,s48_init_%, $(CIGGED)) @@ -216,7 +218,7 @@ scsh/userinfo1.o: scsh/userinfo1.h scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h scsh/flock1.o scsh/flock.o: scsh/flock1.h scsh/network1.o scsh/network.o: scsh/network1.h -scsh/re1.o scsh/re.o: scsh/re1.h +#JMG exists no longer in 0.5.2scsh/re1.o scsh/re.o: scsh/re1.h scsh/select1.o scsh/select.o: scsh/select1.h scsh/syscalls1.o scsh/syscalls.o: scsh/syscalls1.h scsh/time1.o scsh/time.o: scsh/time1.h diff --git a/Makefile.in b/Makefile.in index 50ccf56..c30167d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -111,10 +111,11 @@ SCSHVMHACKS = scsh/proc2.o #JMG: and it's object files #JMG left out: scsh/re.o scsh/re1.o scsh/regexp/regexp.o scsh/regexp/regsub.o -# scsh/fdports1.o -# scsh/rdelim.o +# +# SCSHOBJS = \ scsh/dirstuff1.o \ + scsh/fdports1.o \ scsh/flock.o scsh/flock1.o \ scsh/machine/stdio_dep.o \ scsh/machine/time_dep1.o \ @@ -122,6 +123,7 @@ SCSHOBJS = \ scsh/machine/libansi.o \ scsh/network.o scsh/network1.o \ scsh/putenv.o \ + scsh/rdelim.o \ scsh/rx/re-low.o scsh/rx/re1.o \ scsh/select.o scsh/select1.o \ scsh/sleep1.o \ @@ -158,8 +160,8 @@ enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) # External code to include in the VM # After changing any of these you should delete `scheme48vm' and remake it. -CIGGED = flock network select syscalls tty time sighandlers re_low -#re rdelim +CIGGED = flock network select syscalls tty time sighandlers re_low rdelim +#re CIGGEDOBJ = $(patsubst %,scsh/%.o, $(CIGGED)) CIGGEDINIT = $(patsubst %,s48_init_%, $(CIGGED)) @@ -216,7 +218,7 @@ scsh/userinfo1.o: scsh/userinfo1.h scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h scsh/flock1.o scsh/flock.o: scsh/flock1.h scsh/network1.o scsh/network.o: scsh/network1.h -scsh/re1.o scsh/re.o: scsh/re1.h +#JMG exists no longer in 0.5.2scsh/re1.o scsh/re.o: scsh/re1.h scsh/select1.o scsh/select.o: scsh/select1.h scsh/syscalls1.o scsh/syscalls.o: scsh/syscalls1.h scsh/time1.o scsh/time.o: scsh/time1.h diff --git a/build/initial.image b/build/initial.image index 8dd6d29..bc6aace 100644 Binary files a/build/initial.image and b/build/initial.image differ diff --git a/scheme/interfaces.scm b/scheme/interfaces.scm index 25fa078..6c4c746 100644 --- a/scheme/interfaces.scm +++ b/scheme/interfaces.scm @@ -508,8 +508,9 @@ waiting-for-i/o? ;scheduler steal-channel-port! ;command - steal-channel! ;JMG: For scsh. + steal-channel! ;JMG: 3 For scsh. steal-port! + channel-cell-ref input-channel->port ;usual-resumer posix output-channel->port ;usual-resumer posix diff --git a/scsh/awk.scm b/scsh/awk.scm index 7654e96..e95dcc4 100644 --- a/scsh/awk.scm +++ b/scsh/awk.scm @@ -22,9 +22,6 @@ ;;; next-range next-:range These four functions are used in the ;;; next-range: next-:range: code output by the expander. -;;; This should be hacked to convert regexp strings into regexp structures -;;; at the top of the form, and then just refer to the structs in the -;;; tests. ;;; Examples: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scsh/rdelim.c b/scsh/rdelim.c index ab3d23c..421aecd 100644 --- a/scsh/rdelim.c +++ b/scsh/rdelim.c @@ -1,5 +1,6 @@ /* This is an Scheme48/C interface file, ** automatically generated by a hacked version of cig 3.0. +step 4 */ #include diff --git a/scsh/rdelim.scm b/scsh/rdelim.scm index 05a0a91..5b39f82 100644 --- a/scsh/rdelim.scm +++ b/scsh/rdelim.scm @@ -199,6 +199,7 @@ (else (string-set! buf i (read-char port)) (lp (+ i 1)))))))))) +(foreign-init-name "rdelim") (foreign-source "#include " diff --git a/scsh/rx/spencer.scm b/scsh/rx/spencer.scm index 2656d48..2b4368f 100644 --- a/scsh/rx/spencer.scm +++ b/scsh/rx/spencer.scm @@ -157,7 +157,7 @@ ;;; I is the index of the char following the left brace. (define (parse-posix-braces s i) - (let ((comma (string-index s #\,) i) + (let ((comma (string-index s #\, i)) (rb (string-index s #\} i))) (if rb (if (and comma (< comma rb)) diff --git a/scsh/scsh-interfaces.scm b/scsh/scsh-interfaces.scm index 480cb4f..c648165 100644 --- a/scsh/scsh-interfaces.scm +++ b/scsh/scsh-interfaces.scm @@ -124,6 +124,8 @@ fdes-status set-fdes-status + init-fdports! ;added by JMG + force-output ; set-port-buffering bufpol/block diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index 45b69cb..4b5c108 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -234,7 +234,7 @@ sighandlers ; New in release 0.5. scsh ; re -; rdelim ;rdelim omitted for noew by JMG + rdelim ;rdelim omitted for now by JMG ) ; (optimize auto-integrate) ) @@ -331,7 +331,8 @@ sre-syntax-tools scheme ) - (files awk)) + (files awk) + (optimize auto-integrate)) (define-structure awk-package awk-interface diff --git a/scsh/sighandlers.scm b/scsh/sighandlers.scm index ccf47e2..c46bb61 100644 --- a/scsh/sighandlers.scm +++ b/scsh/sighandlers.scm @@ -65,7 +65,15 @@ ; (with-interrupts mask (lambda () body ...))) (define-simple-syntax (with-enabled-interrupts mask body ...) (begin body ...)) -;(define with-enabled-interrupts* with-interrupts) + +(define (with-enabled-interrupts* thunk thunk) + (warn "JMG: use of with-enabled-interrupts*") + (thunk)) + +(define (set-enabled-interrupts . args) + (warn "JMG: use of set-enabled-interrupts") + #f) + (define-enumeration scsh-os-signal (i/o-completion diff --git a/scsh/syscalls.scm b/scsh/syscalls.scm index 30676af..6868227 100644 --- a/scsh/syscalls.scm +++ b/scsh/syscalls.scm @@ -886,7 +886,7 @@ ;;; (var . val) / "var=val" rep conversion: (define (split-env-string var=val) - (let ((i (index var=val #\=))) + (let ((i (string-index var=val #\=))) (if i (values (substring var=val 0 i) (substring var=val (+ i 1) (string-length var=val))) (error "No \"=\" in environment string" var=val))))