Changeset 3507


Ignore:
Timestamp:
08/25/03 17:33:53 (18 years ago)
Author:
piso
Message:

%RPLACA => SYS::%RPLACA
%RPLACD => SYS::%RPLACD
MAKE-SOCKET => EXT::MAKE-SOCKET

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r3504 r3507  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.350 2003-08-25 14:56:33 piso Exp $
     5 * $Id: Primitives.java,v 1.351 2003-08-25 17:33:53 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 import java.io.File;
    25 import java.io.FileNotFoundException;
    26 import java.io.FileInputStream;
    27 import java.io.FileOutputStream;
    28 import java.io.IOException;
    2924import java.math.BigInteger;
    30 import java.net.Socket;
    3125import java.util.ArrayList;
    3226import java.util.Iterator;
     
    10599    private static final int RPLACD                     = 61;
    106100    private static final int SET                        = 62;
    107     private static final int _RPLACA                    = 63;
    108     private static final int _RPLACD                    = 64;
    109101
    110102    private Primitives()
     
    175167        definePrimitive2("rplacd", RPLACD);
    176168        definePrimitive2("set", SET);
    177         definePrimitive2("%rplaca", _RPLACA);
    178         definePrimitive2("%rplacd", _RPLACD);
    179169    }
    180170
     
    437427                first.setCdr(second);
    438428                return first;
    439             case _RPLACA:                       // ### %rplaca
    440                 first.setCar(second);
    441                 return second;
    442             case _RPLACD:                       // ### %rplacd
    443                 first.setCdr(second);
    444                 return second;
    445429            case SET:                           // ### set
    446430                checkSymbol(first).setSymbolValue(second);
     
    43584342    };
    43594343
    4360     // ### make-socket
    4361     // make-socket host port => stream
    4362     private static final Primitive2 MAKE_SOCKET = new Primitive2("make-socket") {
    4363         public LispObject execute(LispObject first, LispObject second) throws LispError
    4364         {
    4365             String host = LispString.getValue(first);
    4366             int port = Fixnum.getValue(second);
    4367             try {
    4368                 Socket socket = new Socket(host, port);
    4369                 CharacterInputStream in =
    4370                     new CharacterInputStream(socket.getInputStream());
    4371                 CharacterOutputStream out =
    4372                     new CharacterOutputStream(socket.getOutputStream());
    4373                 return new TwoWayStream(in, out);
    4374             }
    4375             catch (Exception e) {
    4376                 throw new LispError(e.getMessage());
    4377             }
    4378         }
    4379     };
    4380 
    43814344    static {
    43824345        new Primitives();
Note: See TracChangeset for help on using the changeset viewer.