From b9c077b76b66273ad7557f097d6271930600c41d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 23 Jun 2022 19:10:56 +0530 Subject: utils: Deprecate call-with-input-pipe. * tissue/utils.scm (call-with-input-pipe): Delete function. --- tissue/utils.scm | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tissue/utils.scm b/tissue/utils.scm index 156d333..4f865be 100644 --- a/tissue/utils.scm +++ b/tissue/utils.scm @@ -21,7 +21,6 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 popen) #:export (call-with-current-directory - call-with-input-pipe get-line-dos-or-unix memoize-thunk)) @@ -33,19 +32,6 @@ directory after THUNK returns." thunk (cut chdir original-current-directory)))) -(define (call-with-input-pipe proc program . args) - "Execute PROGRAM ARGS ... in a subprocess with a pipe to it. Call -PROC with an input port to that pipe. Close the pipe once PROC exits, -even if it exits non-locally. Return the value returned by PROC." - (let ((port #f)) - (dynamic-wind (lambda () (set! port (apply open-pipe* OPEN_READ program args))) - (cut proc port) - (lambda () - (let ((return-value (status:exit-val (close-pipe port)))) - (unless (and return-value - (zero? return-value)) - (error "Invocation of program failed" (cons program args)))))))) - (define (get-line-dos-or-unix port) "Read line from PORT. This differs from `get-line' in (rnrs io ports) in that it also supports DOS line endings." -- cgit v1.2.3