[armedbear-cvs] r11408 - branches/open-external-format/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Nov 30 22:03:20 UTC 2008
Author: ehuelsmann
Date: Sun Nov 30 22:03:16 2008
New Revision: 11408
Log:
Revert unintended part from r11407.
Modified:
branches/open-external-format/src/org/armedbear/lisp/socket.lisp
branches/open-external-format/src/org/armedbear/lisp/socket_stream.java
Modified: branches/open-external-format/src/org/armedbear/lisp/socket.lisp
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/socket.lisp (original)
+++ branches/open-external-format/src/org/armedbear/lisp/socket.lisp Sun Nov 30 22:03:16 2008
@@ -31,7 +31,7 @@
(in-package "SYSTEM")
-(defun get-socket-stream (socket &key (element-type 'character) (external-format :default))
+(defun get-socket-stream (socket &key (element-type 'character))
":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8); the default is CHARACTER."
(cond ((eq element-type 'character))
((equal element-type '(unsigned-byte 8)))
@@ -39,7 +39,7 @@
(error 'simple-type-error
:format-control
":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8).")))
- (%socket-stream socket element-type external-format))
+ (%socket-stream socket element-type))
(defun make-socket (host port)
(%make-socket host port))
Modified: branches/open-external-format/src/org/armedbear/lisp/socket_stream.java
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/socket_stream.java (original)
+++ branches/open-external-format/src/org/armedbear/lisp/socket_stream.java Sun Nov 30 22:03:16 2008
@@ -40,38 +40,19 @@
{
private socket_stream()
{
- super("%socket-stream", PACKAGE_SYS, false, "socket element-type external-format");
+ super("%socket-stream", PACKAGE_SYS, false, "socket element-type");
}
- static final private Symbol keywordCodePage = Packages.internKeyword("CODE-PAGE");
-
- public LispObject execute(LispObject first, LispObject second, LispObject third)
+ public LispObject execute(LispObject first, LispObject second)
throws ConditionThrowable
{
Socket socket = (Socket) ((JavaObject)first).getObject();
LispObject elementType = second; // Checked by caller.
- LispObject externalFormat = third;
- String encoding = "ISO-8859-1"; // for default
- if (externalFormat != NIL) {
- if (externalFormat instanceof Symbol) {
- Symbol enc = (Symbol)externalFormat; //FIXME: class cast exception to be caught
- if (enc != NIL) {
- if (enc != keywordCodePage) {
- encoding = enc.getName();
- }
- //FIXME: the else for the keywordCodePage to be filled in
- }
- //FIXME: the else for the == NIL to be filled in: raise an error...
- } else if (externalFormat instanceof AbstractString) {
- AbstractString encName = (AbstractString) externalFormat;
- encoding = encName.getStringValue();
- }
- }
try {
Stream in =
- new Stream(socket.getInputStream(), elementType, encoding);
+ new Stream(socket.getInputStream(), elementType);
Stream out =
- new Stream(socket.getOutputStream(), elementType, encoding);
+ new Stream(socket.getOutputStream(), elementType);
return new SocketStream(socket, in, out);
}
catch (Exception e) {
More information about the armedbear-cvs
mailing list