parent
321bb04603
commit
3ef18b6abf
|
@ -261,14 +261,15 @@
|
|||
(pop3-handle-response (pop3-read-response connection) command)))
|
||||
|
||||
(define (pop3-dump fd)
|
||||
(let loop ((line (read-crlf-line fd)))
|
||||
(cond ((and (not (eof-object? line))
|
||||
(not (equal? line ".\r")))
|
||||
(and (eq? 0 (string-index line #\.)) ; fix byte-stuffed lines
|
||||
(eq? 1 (string-index line #\. 1))
|
||||
(set! line (substring line 1 (string-length line))))
|
||||
(write-string line)
|
||||
(newline)
|
||||
(loop (read-crlf-line fd))))))
|
||||
(let loop ()
|
||||
(let ((line (read-crlf-line fd)))
|
||||
(if (and (not (eof-object? line))
|
||||
(not (string=? line ".")))
|
||||
(let ((line (if (string-prefix? ".." line)
|
||||
(substring line 1 (string-length line))
|
||||
line)))
|
||||
(write-string line)
|
||||
(newline)
|
||||
(loop))))))
|
||||
|
||||
;; EOF
|
||||
|
|
|
@ -449,7 +449,7 @@
|
|||
handle
|
||||
conditions handle-fatal-error
|
||||
signals
|
||||
(subset srfi-13 (string-index))
|
||||
(subset srfi-13 (string-index string-prefix?))
|
||||
let-opt
|
||||
crlf-io)
|
||||
(files (lib pop3)))
|
||||
|
|
Loading…
Reference in New Issue