Changeset 11408


Ignore:
Timestamp:
11/30/08 22:03:16 (13 years ago)
Author:
ehuelsmann
Message:

Revert unintended part from r11407.

Location:
branches/open-external-format/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/open-external-format/src/org/armedbear/lisp/socket.lisp

    r11407 r11408  
    3232(in-package "SYSTEM")
    3333
    34 (defun get-socket-stream (socket &key (element-type 'character) (external-format :default))
     34(defun get-socket-stream (socket &key (element-type 'character))
    3535  ":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8); the default is CHARACTER."
    3636  (cond ((eq element-type 'character))
     
    4040                :format-control
    4141                ":ELEMENT-TYPE must be CHARACTER or (UNSIGNED-BYTE 8).")))
    42   (%socket-stream socket element-type external-format))
     42  (%socket-stream socket element-type))
    4343
    4444(defun make-socket (host port)
  • branches/open-external-format/src/org/armedbear/lisp/socket_stream.java

    r11407 r11408  
    4141    private socket_stream()
    4242    {
    43         super("%socket-stream", PACKAGE_SYS, false, "socket element-type external-format");
     43        super("%socket-stream", PACKAGE_SYS, false, "socket element-type");
    4444    }
    4545
    46     static final private Symbol keywordCodePage = Packages.internKeyword("CODE-PAGE");
    47 
    48     public LispObject execute(LispObject first, LispObject second, LispObject third)
     46    public LispObject execute(LispObject first, LispObject second)
    4947        throws ConditionThrowable
    5048    {
    5149        Socket socket = (Socket) ((JavaObject)first).getObject();
    5250        LispObject elementType = second; // Checked by caller.
    53   LispObject externalFormat = third;
    54   String encoding = "ISO-8859-1"; // for default
    55   if (externalFormat != NIL) {
    56       if (externalFormat instanceof Symbol) {
    57     Symbol enc = (Symbol)externalFormat; //FIXME: class cast exception to be caught
    58     if (enc != NIL) {
    59         if (enc != keywordCodePage) {
    60       encoding = enc.getName();
    61         }
    62         //FIXME: the else for the keywordCodePage to be filled in
    63     }
    64     //FIXME: the else for the == NIL to be filled in: raise an error...
    65       } else if (externalFormat instanceof AbstractString) {
    66     AbstractString encName = (AbstractString) externalFormat;
    67     encoding = encName.getStringValue();
    68       }
    69   }
    7051        try {
    7152             Stream in =
    72                  new Stream(socket.getInputStream(), elementType, encoding);
     53                 new Stream(socket.getInputStream(), elementType);
    7354             Stream out =
    74                  new Stream(socket.getOutputStream(), elementType, encoding);
     55                 new Stream(socket.getOutputStream(), elementType);
    7556             return new SocketStream(socket, in, out);
    7657        }
Note: See TracChangeset for help on using the changeset viewer.