From: Chris Hanson Date: Tue, 17 Feb 2004 05:53:31 +0000 (+0000) Subject: Use new arguments for OPEN-TCP-STREAM-SOCKET. X-Git-Tag: 20090517-FFI~1687 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=253b90fc80acb6e6edaf8e82f7b5a38554869072;p=mit-scheme.git Use new arguments for OPEN-TCP-STREAM-SOCKET. --- diff --git a/v7/src/edwin/nntp.scm b/v7/src/edwin/nntp.scm index fc6fd6cb9..f8c64d859 100644 --- a/v7/src/edwin/nntp.scm +++ b/v7/src/edwin/nntp.scm @@ -1,8 +1,9 @@ #| -*-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. @@ -63,8 +64,7 @@ USA. (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) diff --git a/v7/src/edwin/webster.scm b/v7/src/edwin/webster.scm index 77e1616bf..49755a9d9 100644 --- a/v7/src/edwin/webster.scm +++ b/v7/src/edwin/webster.scm @@ -1,8 +1,8 @@ #| -*-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. @@ -48,16 +48,13 @@ USA. (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))))) @@ -66,10 +63,10 @@ USA. (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) @@ -83,11 +80,11 @@ USA. (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))))) - + (define (input-port/eof? port) ((port/operation port 'EOF?) port)) @@ -97,7 +94,7 @@ USA. (if port (close-port port))) (global-window-modeline-event! (lambda (window) window 'WEBSTER-CONNECTION-STATUS))) - + (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)) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index 787badd56..0984694c6 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ #| -*-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 @@ -580,9 +580,8 @@ USA. (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 ()