From 2ecccd35468e7a8ca1ade5532fcab18254e8e626 Mon Sep 17 00:00:00 2001 From: shivers Date: Thu, 19 Sep 1996 22:22:46 +0000 Subject: [PATCH] alist->env didn't work, because it was passing a list, not a vector, to the %INSTALL-ENV procedure. Reported by Mike Sperber 9/19/96. --- Error-log | 3 +++ scsh/syscalls.scm | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Error-log b/Error-log index 25e9f04..99ed904 100644 --- a/Error-log +++ b/Error-log @@ -28,3 +28,6 @@ I changed the meta-arg parser (C, Scheme, and doc) so that newline autoreap-policy's optional arg wasn't optional -- the dot was missing. Reported by rthappe@mathematik.uni-freiburg.DE (Rolf-Thomas Happe). + +alist->env didn't work, because it was passing a list, not a vector, + to the %INSTALL-ENV procedure. Reported by Mike Sperber 9/19/96. diff --git a/scsh/syscalls.scm b/scsh/syscalls.scm index 5f67135..5bb8c8f 100644 --- a/scsh/syscalls.scm +++ b/scsh/syscalls.scm @@ -90,8 +90,7 @@ (define (%exec prog arg-list env) (let ((argv (mapv! stringify (list->vector arg-list))) (prog (stringify prog)) - (env (if (eq? env #t) #t - (list->vector (alist->env-list env))))) + (env (if (eq? env #t) #t (alist->env-vec env)))) (%%exec prog argv env))) @@ -879,9 +878,10 @@ cons)) env-list)) -(define (alist->env-list alist) - (map (lambda (var.val) (string-append (car var.val) "=" (cdr var.val))) - alist)) +(define (alist->env-vec alist) + (list->vector (map (lambda (var.val) + (string-append (car var.val) "=" (cdr var.val))) + alist))) ;;; ENV->ALIST @@ -904,7 +904,7 @@ (define-errno-syscall (%install-env env-vec) %install-env/errno) (define (alist->env alist) - (%install-env (alist->env-list alist))) + (%install-env (alist->env-vec alist))) ;;; GETENV, PUTENV, SETENV