[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.24 and 1.25

version 1.24, 2004/08/22 02:00:24 version 1.25, 2004/08/22 12:52:34
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.23 2004/07/30 11:21:55 takayama Exp $  */  /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.24 2004/08/22 02:00:24 takayama Exp $  */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 914  struct object KdataConversion(obj,key)
Line 914  struct object KdataConversion(obj,key)
       strcpy(rob.lc.str,intstr);        strcpy(rob.lc.str,intstr);
       return(rob);        return(rob);
     }else if (strcmp(key,"universalNumber")==0) {      }else if (strcmp(key,"universalNumber")==0) {
       rob.tag = SuniversalNumber;        rob = KintToUniversalNumber(obj.lc.ival);
       rob.lc.universalNumber = intToCoeff(obj.lc.ival,&SmallRing);  
       return(rob);        return(rob);
     }else if (strcmp(key,"double") == 0) {      }else if (strcmp(key,"double") == 0) {
       rob = KpoDouble((double) (obj.lc.ival));        rob = KpoDouble((double) (obj.lc.ival));
Line 1102  struct object KdataConversion(obj,key)
Line 1101  struct object KdataConversion(obj,key)
     }else if (strcmp(key,"double") == 0) {      }else if (strcmp(key,"double") == 0) {
       rob = KpoDouble( toDouble0(obj) );        rob = KpoDouble( toDouble0(obj) );
       return(rob);        return(rob);
       }else if (strcmp(key,"denominator") == 0) {
         rob = KintToUniversalNumber(1);
         return(rob);
     }else{      }else{
       warningKan("Sorry. This type of data conversion of universalNumber has not supported yet.\n");        warningKan("Sorry. This type of data conversion of universalNumber has not supported yet.\n");
     }      }
Line 1240  struct object KpoUniversalNumber(u)
Line 1242  struct object KpoUniversalNumber(u)
   obj.lc.universalNumber = u;    obj.lc.universalNumber = u;
   return(obj);    return(obj);
 }  }
   struct object KintToUniversalNumber(n)
            int n;
   {
     struct object rob;
     extern struct ring SmallRing;
     rob.tag = SuniversalNumber;
     rob.lc.universalNumber = intToCoeff(n,&SmallRing);
     return(rob);
   }
   
 /*** conversion 2. Data conversions on arrays and matrices. ****/  /*** conversion 2. Data conversions on arrays and matrices. ****/
 struct object arrayOfPOLYToArray(aa)  struct object arrayOfPOLYToArray(aa)
      struct arrayOfPOLY *aa;       struct arrayOfPOLY *aa;

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

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