#| -*-Scheme-*-
-$Id: nntp.scm,v 1.27 2003/02/14 18:28:12 cph Exp $
+$Id: nntp.scm,v 1.28 2004/02/17 05:52:20 cph Exp $
Copyright 1995,1996,1997,1998,1999,2003 Massachusetts Institute of Technology
+Copyright 2004 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(let ((port
(open-tcp-stream-socket (or (nntp-connection:proxy connection)
(nntp-connection:server connection))
- "nntp"
- nntp-socket-buffer-size)))
+ "nntp")))
(set-nntp-connection:port! connection port)
(set-nntp-connection:banner! connection (input-port/read-line port)))
(set-nntp-connection:current-group! connection #f)
#| -*-Scheme-*-
-$Id: webster.scm,v 1.7 2003/02/14 18:28:14 cph Exp $
+$Id: webster.scm,v 1.8 2004/02/17 05:52:26 cph Exp $
-Copyright (c) 1998-2000 Massachusetts Institute of Technology
+Copyright 1998,2000,2004 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(string=? "MATCHS" line)
(string-prefix? "DEFINITION " line))
(let loop ((lines '()))
- (call-with-values
- (lambda () (webster-read-line webster-server-port))
- (lambda (line end?)
- (cond ((not end?)
- (loop (cons line lines)))
- ((null? lines)
- (message line))
- (else
- (webster-show-output
- (reverse! (cons line lines)))))))))
+ (receive (line end?) (webster-read-line webster-server-port)
+ (cond ((not end?)
+ (loop (cons line lines)))
+ ((pair? lines)
+ (webster-show-output (reverse! (cons line lines))))
+ (else
+ (message line))))))
(else
(error "Unrecognized response from Webster server:" line)))))
(values line
(let ((delim (read-char port)))
(or (eof-object? delim)
- (not (char=? #\newline delim)))))))
+ (not (char=? delim #\newline)))))))
(define webster-line-delimiters
- (char-set #\newline (integer->char 0) (integer->char #o200)))
+ (char-set #\newline #\U+00 #\U+80))
(define webster-server-port #f)
(lambda ()
(set! webster-server-port
(open-tcp-stream-socket server
- (ref-variable webster-port buffer)
- 4096))))
+ (ref-variable webster-port buffer)))
+ unspecific))
(global-window-modeline-event!
(lambda (window) window 'WEBSTER-CONNECTION-STATUS)))))
-
+\f
(define (input-port/eof? port)
((port/operation port 'EOF?) port))
(if port (close-port port)))
(global-window-modeline-event!
(lambda (window) window 'WEBSTER-CONNECTION-STATUS)))
-\f
+
(define (webster-show-output lines)
(let ((buffer (find-or-create-buffer (ref-variable webster-buffer-name))))
(set-buffer-major-mode! buffer (ref-mode-object webster))
#| -*-Scheme-*-
-$Id: imail-imap.scm,v 1.201 2004/02/16 05:48:59 cph Exp $
+$Id: imail-imap.scm,v 1.202 2004/02/17 05:53:31 cph Exp $
Copyright 1999,2000,2001,2003,2004 Massachusetts Institute of Technology
(let ((url (imap-connection-url connection)))
(let ((port
(open-tcp-stream-socket (imap-url-host url)
- (or (imap-url-port url) "imap2")
- #f
- "\n")))
+ (or (imap-url-port url) "imap2"))))
+ (port/set-line-ending port 'NEWLINE)
(let ((response
(imap:catch-no-response #f
(lambda ()