[BACK]Return to CMO_ZZ.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath / ORG / openxm / tam

Diff for /OpenXM/src/OpenMath/ORG/openxm/tam/CMO_ZZ.java between version 1.1 and 1.3

version 1.1, 2000/09/12 07:05:07 version 1.3, 2000/10/11 08:32:15
Line 1 
Line 1 
 /**  /**
  * $OpenXM$   * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/CMO_ZZ.java,v 1.2 2000/09/13 06:32:43 tam Exp $
  */   */
 package ORG.openxm.tam;  package ORG.openxm.tam;
   
Line 54  final public class CMO_ZZ extends CMO{
Line 54  final public class CMO_ZZ extends CMO{
     return 0;      return 0;
   }    }
   
   public void sendByObject(OpenXMconnection os) throws IOException{    public void sendByObject(OpenXMstream os) throws IOException{
     if(this.num.signum()==0){      if(this.num.signum()==0){
       os.writeInt(0);        os.writeInt(0);
     }else{      }else{
       int len = (this.num.abs().bitLength()+31)/32;        int len = (this.num.abs().bitLength()+31)/32;
       //System.out.println("sing0: "+this.num.bitLength());        //System.err.println("sing0: "+this.num.bitLength());
       //System.out.println("sing1: "+this.num.abs().bitLength());        //System.err.println("sing1: "+this.num.abs().bitLength());
   
       os.writeInt(this.num.signum()*len);        os.writeInt(this.num.signum()*len);
       //System.out.println("sing: "+this.num.signum()*len);        //System.err.println("sing: "+this.num.signum()*len);
   
       for(BigInteger a = this.num.abs();a.compareTo(new BigInteger("0"))>0;        for(BigInteger a = this.num.abs();a.compareTo(new BigInteger("0"))>0;
           a = a.divide(new BigInteger("4294967296"))){            a = a.divide(new BigInteger("4294967296"))){
         os.writeInt(a.remainder(new BigInteger("4294967296")).intValue());          os.writeInt(a.remainder(new BigInteger("4294967296")).intValue());
         //System.out.println("remaind: "+a.remainder(new BigInteger("4294967296")).intValue());          //System.err.println("remaind: "+a.remainder(new BigInteger("4294967296")).intValue());
       }        }
     }      }
   }    }
   
   static protected CMO receive(OpenXMconnection is) throws IOException{    static protected CMO receive(OpenXMstream is) throws IOException{
     int len;      int len;
     BigInteger a = new BigInteger("0");      BigInteger a = new BigInteger("0");
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>