@@ -221,39 +221,10 @@ ;;; ;; ;;; ;; (use sparse-vectors) ;;; ;; ;;; ;; (require-library mutils) ;;; -;; copied from egg call-with-environment-variables -;; -(define (call-with-environment-variables variables thunk) - ;; @("Sets up environment variable via dynamic-wind which are taken down after thunk." - ;; (variables "An alist of the form {{'((\"var\" . \"value\") ...)}}") - ;; (thunk "The thunk to execute with a modified environment")) - (let ((pre-existing-variables - (map (lambda (var-value) - (let ((var (car var-value))) - (cons var (get-environment-variable var)))) - variables))) - (dynamic-wind - (lambda () (void)) - (lambda () -;; (use posix) - (for-each (lambda (var-value) - (setenv (car var-value) (cdr var-value))) - variables) - (thunk)) - (lambda () - (for-each (lambda (var-value) - (let ((var (car var-value)) - (value (cdr var-value))) - (if value - (setenv var value) - (unsetenv var)))) - pre-existing-variables))))) - - (define *usage-log-file* #f) ;; put path to file for logging usage in this var in the ~/.megatestrc file (define *usage-use-seconds* #t) ;; for Epoc seconds in usage logging change this to #t in ~/.megatestrc file ;; load the ~/.megatestrc file, put (use trace)(trace-call-sites #t)(trace function-you-want-to-trace) in this file