[slime-cvs] CVS update: slime/swank-sbcl.lisp
Helmut Eller
heller at common-lisp.net
Fri Nov 19 19:06:41 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv12815
Modified Files:
swank-sbcl.lisp
Log Message:
(accept-connection): Accept :external-format as argument.
Date: Fri Nov 19 20:06:37 2004
Author: heller
Index: slime/swank-sbcl.lisp
diff -u slime/swank-sbcl.lisp:1.109 slime/swank-sbcl.lisp:1.110
--- slime/swank-sbcl.lisp:1.109 Fri Nov 19 02:19:25 2004
+++ slime/swank-sbcl.lisp Fri Nov 19 20:06:36 2004
@@ -69,8 +69,8 @@
(sb-sys:invalidate-descriptor (socket-fd socket))
(sb-bsd-sockets:socket-close socket))
-(defimplementation accept-connection (socket)
- (make-socket-io-stream (accept socket)))
+(defimplementation accept-connection (socket &key external-format)
+ (make-socket-io-stream (accept socket) external-format))
(defvar *sigio-handlers* '()
"List of (key . fn) pairs to be called on SIGIO.")
@@ -119,11 +119,15 @@
(sb-bsd-sockets:socket (sb-bsd-sockets:socket-file-descriptor socket))
(file-stream (sb-sys:fd-stream-fd socket))))
-(defun make-socket-io-stream (socket)
- (sb-bsd-sockets:socket-make-stream socket
- :output t
- :input t
- :element-type 'base-char))
+(defun make-socket-io-stream (socket external-format)
+ (let ((encoding (ecase external-format
+ (:iso-latin-1-unix :iso-8859-1)
+ (:utf-8-unix :utf-8))))
+ (sb-bsd-sockets:socket-make-stream socket
+ :output t
+ :input t
+ :element-type 'character
+ :external-format encoding)))
(defun accept (socket)
"Like socket-accept, but retry on EAGAIN."
More information about the slime-cvs
mailing list