(let ((delimiters (char-set #\newline)))
(lambda (port)
(let loop ()
- (let ((line (read-string delimiters port)))
+ (let ((line (read-delimited-string delimiters port)))
(if (eof-object? line)
(error "EOF encountered when parsing line."))
(read-char port)
'()))))))
(define (read-mailrc-line port)
- (let ((line (read-string char-set:newline port)))
+ (let ((line (read-delimited-string char-set:newline port)))
(and (not (eof-object? line))
(begin
(read-char port)
(list "-p"
(call-with-input-file (cadr password)
(lambda (port)
- (read-string (char-set #\newline) port))))))
+ (read-delimited-string (char-set #\newline)
+ port))))))
(else
(error "Illegal password:" password))))))
\f
(error "Unrecognized response from Webster server:" line)))))
(define (webster-read-line port)
- (let ((line (read-string webster-line-delimiters port)))
+ (let ((line (read-delimited-string webster-line-delimiters port)))
(values line
(let ((delim (read-char port)))
(or (eof-object? delim)
(read-required-line port)))))
(define (read-to-eom port)
- (let ((string (read-string rmail-message:end-char-set port)))
+ (let ((string (read-delimited-string rmail-message:end-char-set port)))
(if (or (eof-object? string)
(eof-object? (read-char port)))
(error "EOF while reading RMAIL message body:" port))
char))
(define (read-string-internal delimiters port)
- (let ((s (read-string delimiters port)))
+ (let ((s (read-delimited-string delimiters port)))
(if (and (not (eof-object? s))
imap-transcript-port)
(write-string s imap-transcript-port))
(output-port-channel port*)))))))
(call-with-input-file fname
(lambda (input)
- (let ((string (read-string (char-set) input)))
+ (let ((string (read-delimited-string (char-set) input)))
(if (not (eof-object? string))
(write-string string
port)))))
(lambda (fname)
(call-with-output-file fname
(lambda (output)
- (write-string (read-string (char-set) port)
+ (write-string (read-delimited-string (char-set) port)
output)))
(call-with-input-file fname
(lambda (port*)