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

Diff for /OpenXM/src/kan96xx/Kan/kanExport0.c between version 1.25 and 1.26

version 1.25, 2004/08/22 12:52:34 version 1.26, 2004/08/23 08:33:55
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.24 2004/08/22 02:00:24 takayama Exp $  */  /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.25 2004/08/22 12:52:34 takayama Exp $  */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 797  struct object KooGreater(obj1,obj2)
Line 797  struct object KooGreater(obj1,obj2)
     if ( KopDouble(obj1) > KopDouble(obj2) ) return(KpoInteger(1));      if ( KopDouble(obj1) > KopDouble(obj2) ) return(KpoInteger(1));
     else return(KpoInteger(0));      else return(KpoInteger(0));
     break;      break;
     case Sarray:
     {
       int i,m1,m2;
       struct object rr;
       m1 = getoaSize(obj1); m2 = getoaSize(obj2);
       for (i=0; i< (m1>m2?m2:m1); i++) {
         rr=KooGreater(getoa(obj1,i),getoa(obj2,i));
         if (KopInteger(rr) == 1) return rr;
         rr=KooGreater(getoa(obj2,i),getoa(obj1,i));
         if (KopInteger(rr) == 1) return KpoInteger(0);
       }
       if (m1 > m2) return KpoInteger(1);
       else return KpoInteger(0);
     }
     break;
   default:    default:
     errorKan1("%s\n","KooGreater() has not supported these objects yet.");      errorKan1("%s\n","KooGreater() has not supported these objects yet.");
     break;      break;
Line 838  struct object KooLess(obj1,obj2)
Line 853  struct object KooLess(obj1,obj2)
     if ( KopDouble(obj1) < KopDouble(obj2) ) return(KpoInteger(1));      if ( KopDouble(obj1) < KopDouble(obj2) ) return(KpoInteger(1));
     else return(KpoInteger(0));      else return(KpoInteger(0));
     break;      break;
     case Sarray:
     {
       int i,m1,m2;
       struct object rr;
       m1 = getoaSize(obj1); m2 = getoaSize(obj2);
       for (i=0; i< (m1>m2?m2:m1); i++) {
         rr=KooLess(getoa(obj1,i),getoa(obj2,i));
         if (KopInteger(rr) == 1) return rr;
         rr=KooLess(getoa(obj2,i),getoa(obj1,i));
         if (KopInteger(rr) == 1) return KpoInteger(0);
       }
       if (m1 < m2) return KpoInteger(1);
       else return KpoInteger(0);
     }
     break;
   default:    default:
     errorKan1("%s\n","KooLess() has not supported these objects yet.");      errorKan1("%s\n","KooLess() has not supported these objects yet.");
     break;      break;

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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