[BACK]Return to elimi.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath

Diff for /OpenXM/src/OpenMath/elimi.java between version 1.1 and 1.6

version 1.1, 1999/11/10 21:25:48 version 1.6, 2000/10/11 08:32:13
Line 1 
Line 1 
 /**  /**
  * $OpenXM$   * $OpenXM: OpenXM/src/OpenMath/elimi.java,v 1.5 2000/04/02 19:24:40 tam Exp $
  */   */
   
 import JP.ac.kobe_u.math.tam.OpenXM.*;  import JP.ac.kobe_u.math.tam.OpenXM.*;
Line 102  class elimi extends Applet implements ActionListener,R
Line 102  class elimi extends Applet implements ActionListener,R
   public void run(){ // for debug    public void run(){ // for debug
     try{      try{
       while(true){        while(true){
         CMO tmp;          OXmessage tmp;
   
         Thread.yield();          Thread.yield();
   
         switch(oxm.receiveOXtag()){          tmp = oxm.receive();
         case OpenXM.OX_COMMAND:          System.err.println("=> "+ tmp);
           oxm.receiveSM();  
           break;  
   
         case OpenXM.OX_DATA:  
           tmp = oxm.receiveCMO();  
           System.out.println("=> "+ tmp);  
           break;  
         }  
       }        }
     }catch(java.io.IOException e){}      }catch(java.io.IOException e){}
   }    }
Line 183  class elimi extends Applet implements ActionListener,R
Line 175  class elimi extends Applet implements ActionListener,R
         com += ")] gb";          com += ")] gb";
   
         debug("command: "+ com);          debug("command: "+ com);
         oxm.sendCMO(new CMO_STRING(com));          oxm.send(new CMO_STRING(com));
         oxm.sendSM(new SM(SM.SM_executeStringByLocalParser));          oxm.send(new SM(SM.SM_executeStringByLocalParser));
         oxm.sendSM(new SM(SM.SM_popString));          oxm.send(new SM(SM.SM_popString));
       }catch(java.io.IOException e){}        }catch(java.io.IOException e){
         }catch(MathcapViolation e){
         }
     }      }
     /*      /*
       if ("first".equals(arg)) {        if ("first".equals(arg)) {
Line 204  class elimi extends Applet implements ActionListener,R
Line 198  class elimi extends Applet implements ActionListener,R
   }    }
   
   public void start(){    public void start(){
     System.out.println("Connecting to "+ host      System.err.println("Connecting to "+ host
                        +"("+ ControlPort +","+ DataPort +")");                         +"("+ ControlPort +","+ DataPort +")");
   
     try{      try{
         Runtime runtime = Runtime.getRuntime();
   
         runtime.exec("sh -c \"xterm -name $OpenXM_HOME\"");
         //runtime.getInputstream();
         //runtime.getOutput();
         //runtime.exec("sh -c \"/home/tam/OpenXM/lib/sm1/bin/oxlog /usr/X11R6/bin/xterm -name echo ${OpenXM_HOME} /home/tam/OpenXM/lib/sm1/bin/ox -ox /home/tam/OpenXM/lib/sm1/bin/ox_sm1_forAsir -data "+ DataPort +" -control "+ ControlPort +"\"");
   
         Thread.sleep(3000);
   
       oxm = new OpenXM(host,ControlPort,DataPort);        oxm = new OpenXM(host,ControlPort,DataPort);
       System.out.println("Connected.");        System.err.println("Connected.");
       oxm.sendCMO(new CMO_STRING("(cohom.sm1) run ;\n"));        oxm.send(new CMO_STRING("(cohom.sm1) run ;\n"));
       oxm.sendSM(new SM(SM.SM_executeStringByLocalParser));        oxm.send(new SM(SM.SM_executeStringByLocalParser));
   
       thread = new Thread(this);        thread = new Thread(this);
       thread.start();        thread.start();
     }catch(java.io.IOException e){      }catch(Exception e){
       System.out.println("failed.");        System.err.println("failed.");
       stop();        stop();
     }      }
   }    }
Line 250  class elimi extends Applet implements ActionListener,R
Line 253  class elimi extends Applet implements ActionListener,R
   
     for(int i=0;i<argv.length;i++){      for(int i=0;i<argv.length;i++){
       if(argv[i].equals("-h")){        if(argv[i].equals("-h")){
         System.out.print(usage());          System.err.print(usage());
         System.exit(0);          System.exit(0);
       }else if(argv[i].equals("-debug")){        }else if(argv[i].equals("-debug")){
         //debug = true;          //debug = true;

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

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