aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-05-20 11:29:49 +0100
committerChristopher Baines <mail@cbaines.net>2023-05-20 11:29:49 +0100
commit4072d56305129ddcc81f1a4968ceabd3af73a066 (patch)
tree3574a9b2a58df848c2f823e8b32e5c7ec7601581
parent768c5e6d56569eaee46e98b41f5e28f43e424b64 (diff)
downloadbuild-coordinator-4072d56305129ddcc81f1a4968ceabd3af73a066.tar
build-coordinator-4072d56305129ddcc81f1a4968ceabd3af73a066.tar.gz
Remove unused make-base64-output-port
-rw-r--r--guix-build-coordinator/utils.scm42
1 files changed, 0 insertions, 42 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index b126efb..a98121b 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -47,8 +47,6 @@
#:use-module (guix scripts substitute)
#:export (random-v4-uuid
- make-base64-output-port
-
&port-timeout
&port-read-timeout
&port-write-timeout
@@ -170,46 +168,6 @@
"-"))))
-(define (make-base64-output-port port)
- (define line-length 72) ; must be a multiple of 4
- (define buffer-length
- (let ((bytes-per-line (* 3 (/ 72 4)))
- (lines-per-buffer 65536))
- (* bytes-per-line lines-per-buffer)))
-
- (define buffer (make-bytevector buffer-length))
- (define buffered-bytes 0)
-
- (define (write! bv start count)
- (let ((remaining-buffer-space (- buffer-length buffered-bytes)))
- (if (<= count remaining-buffer-space)
- (begin
- (bytevector-copy! bv start
- buffer buffered-bytes count)
- (set! buffered-bytes (+ buffered-bytes count))
- count)
- (begin
- (bytevector-copy! bv start
- buffer buffered-bytes remaining-buffer-space)
- (base64-encode buffer 0 buffer-length line-length
- #f base64-alphabet port)
- (set! buffered-bytes 0)
- remaining-buffer-space))))
-
- (define (close)
- (base64-encode buffer 0 buffered-bytes line-length
- #f base64-alphabet port)
- (set! buffer #f)
- (set! buffered-bytes 0)
- #t)
-
- (make-custom-binary-output-port
- "base64-output"
- write!
- #f
- #f
- close))
-
(define (request-query-parameters request)
(define (parse-query-string query)
"Parse and decode the URI query string QUERY and return an alist."