[BACK]Return to primitive.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/primitive.c between version 1.15 and 1.16

version 1.15, 2004/09/12 10:22:50 version 1.16, 2004/09/12 10:58:28
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.14 2004/09/12 08:55:36 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/primitive.c,v 1.15 2004/09/12 10:22:50 takayama Exp $ */
 /*   primitive.c */  /*   primitive.c */
 /*  The functions in this module were in stackmachine.c */  /*  The functions in this module were in stackmachine.c */
   
Line 40  static char *operatorType(type)
Line 40  static char *operatorType(type)
  return("Unknown operator");   return("Unknown operator");
 }  }
   
   #define evalEA(ob1) if (ob1.tag == SexecutableArray) {\
             executeExecutableArray(ob1,(char *)NULL,0); ob1 = Kpop();}
   
 /****** primitive functions *****************************************  /****** primitive functions *****************************************
   the values must be greater than 1. 0 is used for special purposes.*/    the values must be greater than 1. 0 is used for special purposes.*/
 #define Sadd              1  #define Sadd              1
Line 540  int executePrimitive(ob) 
Line 543  int executePrimitive(ob) 
   
     /* Postscript primitives :arithmetic */      /* Postscript primitives :arithmetic */
   case Sadd:    case Sadd:
     ob1 = Kpop();      ob1 = Kpop();
     ob2 = Kpop();      ob2 = Kpop();
       evalEA(ob1); evalEA(ob2);
     rob = KooAdd(ob1,ob2);      rob = KooAdd(ob1,ob2);
     Kpush(rob);      Kpush(rob);
     break;      break;
   case Ssub:    case Ssub:
     ob2 = Kpop();      ob2 = Kpop();
     ob1 = Kpop();      ob1 = Kpop();
       evalEA(ob1); evalEA(ob2);
     rob = KooSub(ob1,ob2);      rob = KooSub(ob1,ob2);
     Kpush(rob);      Kpush(rob);
     break;      break;
   case Smult:    case Smult:
     ob2 = Kpop();      ob2 = Kpop();
     ob1 = Kpop();      ob1 = Kpop();
       evalEA(ob1); evalEA(ob2);
     rob = KooMult(ob1,ob2);      rob = KooMult(ob1,ob2);
     Kpush(rob);      Kpush(rob);
     break;      break;
   case Sidiv:    case Sidiv:
     ob2 = Kpop(); ob1 = Kpop();      ob2 = Kpop(); ob1 = Kpop();
       evalEA(ob1); evalEA(ob2);
     rob = KooDiv(ob1,ob2);      rob = KooDiv(ob1,ob2);
     Kpush(rob);      Kpush(rob);
     break;      break;
   
   case Sdiv:    case Sdiv:
     ob2 = Kpop(); ob1 = Kpop();      ob2 = Kpop(); ob1 = Kpop();
       evalEA(ob1); evalEA(ob2);
     rob = KooDiv2(ob1,ob2);      rob = KooDiv2(ob1,ob2);
     Kpush(rob);      Kpush(rob);
     break;      break;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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