[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.20 and 1.22

version 1.20, 2003/12/06 02:49:22 version 1.22, 2004/05/13 04:38:28
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.19 2003/12/05 13:51:31 takayama Exp $  */  /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.21 2004/02/28 13:39:42 takayama Exp $  */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 144  struct object KooAdd(ob1,ob2)
Line 144  struct object KooAdd(ob1,ob2)
   
   default:    default:
     if (QuoteMode) {      if (QuoteMode) {
           rob = addTree(ob1,ob2);        rob = addTree(ob1,ob2);
     }else{      }else{
       warningKan("KooAdd() has not supported yet these objects.\n");        warningKan("KooAdd() has not supported yet these objects.\n");
     }      }
Line 422  struct object KooMult(ob1,ob2)
Line 422  struct object KooMult(ob1,ob2)
   
   default:    default:
     if (QuoteMode) {      if (QuoteMode) {
           rob = timesTree(ob1,ob2);        rob = timesTree(ob1,ob2);
     }else{      }else{
       warningKan("KooMult() has not supported yet these objects.\n");        warningKan("KooMult() has not supported yet these objects.\n");
     }      }
Line 1158  struct object KdataConversion(obj,key)
Line 1158  struct object KdataConversion(obj,key)
     if (strcmp(key,"orderMatrix")==0) {      if (strcmp(key,"orderMatrix")==0) {
       rob = oGetOrderMatrix(KopRingp(obj));        rob = oGetOrderMatrix(KopRingp(obj));
       return(rob);        return(rob);
       }else if (strcmp(key,"oxRingStructure")==0) {
         rob = oRingToOXringStructure(KopRingp(obj));
         return(rob);
     }else{      }else{
       warningKan("Sorryl This type of data conversion of ringp has not supported yet.\n");        warningKan("Sorryl This type of data conversion of ringp has not supported yet.\n");
     }      }
Line 1221  struct object KpoRingp(ringp)
Line 1224  struct object KpoRingp(ringp)
   return(obj);    return(obj);
 }  }
   
   struct object KpoUniversalNumber(u)
        struct coeff *u;
   {
     struct object obj;
     obj.tag = SuniversalNumber;
     obj.lc.universalNumber = u;
     return(obj);
   }
 /*** 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;
Line 1642  int KsetUpRing(ob1,ob2,ob3,ob4,ob5)
Line 1653  int KsetUpRing(ob1,ob2,ob3,ob4,ob5)
             }              }
           }            }
         }          }
                 switch_function("grade","module1v");          switch_function("grade","module1v");
                 /* Warning: grading is changed to module1v!! */          /* Warning: grading is changed to module1v!! */
       } else {        } else {
         errorKan1("%s\n","Unknown keyword to set_up_ring@");          errorKan1("%s\n","Unknown keyword to set_up_ring@");
       }        }
Line 2089  struct object KstringToArgv(struct object ob) {
Line 2100  struct object KstringToArgv(struct object ob) {
   int n,wc,i,inblank;    int n,wc,i,inblank;
   char **argv;    char **argv;
   if (ob.tag != Sdollar)    if (ob.tag != Sdollar)
         errorKan1("%s\n","KstringToArgv(): the argument must be a string.");      errorKan1("%s\n","KstringToArgv(): the argument must be a string.");
   n = strlen(KopString(ob));    n = strlen(KopString(ob));
   s = (char *) sGC_malloc(sizeof(char)*(n+2));    s = (char *) sGC_malloc(sizeof(char)*(n+2));
   if (s == NULL) errorKan1("%s\n","KstringToArgv(): No memory.");    if (s == NULL) errorKan1("%s\n","KstringToArgv(): No memory.");
   strcpy(s,KopString(ob));    strcpy(s,KopString(ob));
   inblank = 1;  wc = 0;    inblank = 1;  wc = 0;
   for (i=0; i<n; i++) {    for (i=0; i<n; i++) {
         if (inblank && (s[i] > ' ')) {      if (inblank && (s[i] > ' ')) {
           wc++; inblank = 0;        wc++; inblank = 0;
         }else if ((!inblank) && (s[i] <= ' ')) {      }else if ((!inblank) && (s[i] <= ' ')) {
           inblank = 1;        inblank = 1;
         }      }
   }    }
   argv = (char **) sGC_malloc(sizeof(char *)*(wc+2));    argv = (char **) sGC_malloc(sizeof(char *)*(wc+2));
   argv[0] = NULL;    argv[0] = NULL;
   inblank = 1;  wc = 0;    inblank = 1;  wc = 0;
   for (i=0; i<n; i++) {    for (i=0; i<n; i++) {
         if (inblank && (s[i] > ' ')) {      if (inblank && (s[i] > ' ')) {
           argv[wc] = &(s[i]); argv[wc+1]=NULL;        argv[wc] = &(s[i]); argv[wc+1]=NULL;
           wc++; inblank = 0;        wc++; inblank = 0;
         }else if ((inblank == 0) && (s[i] <= ' ')) {      }else if ((inblank == 0) && (s[i] <= ' ')) {
           inblank = 1; s[i] = 0;        inblank = 1; s[i] = 0;
         }else if (inblank && (s[i] <= ' ')) {      }else if (inblank && (s[i] <= ' ')) {
           s[i] = 0;        s[i] = 0;
         }      }
   }    }
   
   rob = newObjectArray(wc);    rob = newObjectArray(wc);
   for (i=0; i<wc; i++) {    for (i=0; i<wc; i++) {
         putoa(rob,i,KpoString(argv[i]));      putoa(rob,i,KpoString(argv[i]));
         printf("%s\n",argv[i]);      /* printf("%s\n",argv[i]); */
   }    }
   return(rob);    return(rob);
 }  }
Line 2149  struct object KooPower(struct object ob1,struct object
Line 2160  struct object KooPower(struct object ob1,struct object
   struct object rob;    struct object rob;
   /* Bug. It has not yet been implemented. */    /* Bug. It has not yet been implemented. */
   if (QuoteMode) {    if (QuoteMode) {
         rob = powerTree(ob1,ob2);      rob = powerTree(ob1,ob2);
   }else{    }else{
         warningKan("KooDiv2() has not supported yet these objects.\n");      warningKan("KooDiv2() has not supported yet these objects.\n");
   }    }
   return(rob);    return(rob);
 }  }
Line 2404  struct object KgbExtension(struct object obj)
Line 2415  struct object KgbExtension(struct object obj)
     if (obj1.tag != Spoly)      if (obj1.tag != Spoly)
       errorKan1("%s\n","[(reduceContent)  poly1 ] gbext.");        errorKan1("%s\n","[(reduceContent)  poly1 ] gbext.");
     f1 = KopPOLY(obj1);      f1 = KopPOLY(obj1);
         rob = newObjectArray(2);      rob = newObjectArray(2);
         f1 = reduceContentOfPoly(f1,&cont);      f1 = reduceContentOfPoly(f1,&cont);
         putoa(rob,0,KpoPOLY(f1));      putoa(rob,0,KpoPOLY(f1));
         if (f1 == POLYNULL) {      if (f1 == POLYNULL) {
           putoa(rob,1,KpoPOLY(f1));        putoa(rob,1,KpoPOLY(f1));
         }else{      }else{
           putoa(rob,1,KpoPOLY(newCell(cont,newMonomial(f1->m->ringp))));        putoa(rob,1,KpoPOLY(newCell(cont,newMonomial(f1->m->ringp))));
         }      }
   }else if (strcmp(key,"ord_ws_all")==0) {    }else if (strcmp(key,"ord_ws_all")==0) {
     if (size != 3) errorKan1("%s\n","[(ord_ws_all) fv wv] gbext");      if (size != 3) errorKan1("%s\n","[(ord_ws_all) fv wv] gbext");
     obj1 = getoa(obj,1);      obj1 = getoa(obj,1);
Line 2843  errorKan1(str,message)
Line 2854  errorKan1(str,message)
   longjmp(EnvOfStackMachine,1);    longjmp(EnvOfStackMachine,1);
 #endif  #endif
 }  }
   
   
 warningKan(str)  warningKan(str)
      char *str;       char *str;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.22

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