| version 1.33, 2004/09/11 01:00:42 | 
version 1.37, 2004/09/17 02:42:57 | 
 | 
 | 
|  /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.32 2004/09/09 11:42:22 takayama Exp $  */ | 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport0.c,v 1.36 2004/09/16 02:22:03 takayama Exp $  */ | 
|  #include <stdio.h> | 
 #include <stdio.h> | 
|  #include "datatype.h" | 
 #include "datatype.h" | 
|  #include "stackm.h" | 
 #include "stackm.h" | 
| Line 687  KooEqualQ(obj1,obj2) | 
 
  | 
| Line 687  KooEqualQ(obj1,obj2) | 
 
 
 | 
|  { | 
 { | 
|    struct object ob; | 
   struct object ob; | 
|    int i; | 
   int i; | 
|   | 
   extern int Verbose; | 
|    if (obj1.tag != obj2.tag) { | 
   if (obj1.tag != obj2.tag) { | 
|      warningKan("KooEqualQ(ob1,ob2): the datatypes of ob1 and ob2  are not same. Returns false (0).\n"); | 
     warningKan("KooEqualQ(ob1,ob2): the datatypes of ob1 and ob2  are not same. Returns false (0).\n"); | 
|   | 
         if (Verbose & 0x10) { | 
|   | 
           fprintf(stderr,"obj1(tag:%d)=",obj1.tag); | 
|   | 
           printObject(obj1,0,stderr); | 
|   | 
           fprintf(stderr,", obj2(tag:%d)=",obj2.tag); | 
|   | 
           printObject(obj2,0,stderr); | 
|   | 
           fprintf(stderr,"\n"); fflush(stderr); | 
|   | 
         } | 
|      return(0); | 
     return(0); | 
|    } | 
   } | 
|    switch(obj1.tag) { | 
   switch(obj1.tag) { | 
| Line 1646  int KsetUpRing(ob1,ob2,ob3,ob4,ob5) | 
 
  | 
| Line 1654  int KsetUpRing(ob1,ob2,ob3,ob4,ob5) | 
 
 
 | 
|    newRingp->degreeShiftSize = 0; | 
   newRingp->degreeShiftSize = 0; | 
|    newRingp->degreeShiftN = 0; | 
   newRingp->degreeShiftN = 0; | 
|    newRingp->degreeShift = NULL; | 
   newRingp->degreeShift = NULL; | 
|   | 
   newRingp->partialEcart = 0; | 
|   | 
   newRingp->partialEcartGlobalVarX = NULL; | 
|   | 
  | 
|    if (ob5.tag != Sarray || (getoaSize(ob5) % 2) != 0) { | 
   if (ob5.tag != Sarray || (getoaSize(ob5) % 2) != 0) { | 
|      errorKan1("%s\n","[(keyword) value (keyword) value ....] should be given."); | 
     errorKan1("%s\n","[(keyword) value (keyword) value ....] should be given."); | 
| Line 1726  int KsetUpRing(ob1,ob2,ob3,ob4,ob5) | 
 
  | 
| Line 1736  int KsetUpRing(ob1,ob2,ob3,ob4,ob5) | 
 
 
 | 
|              } | 
             } | 
|            } | 
           } | 
|          } | 
         } | 
|   | 
       } else if (strcmp(KopString(getoa(ob5,i)),"partialEcartGlobalVarX") == 0) { | 
|   | 
         if (getoa(ob5,i+1).tag != Sarray) { | 
|   | 
           errorKan1("%s\n","An array of array should be given. (partialEcart)"); | 
|   | 
         } | 
|   | 
         { | 
|   | 
           struct object odv; | 
|   | 
           struct object ovv; | 
|   | 
           int k,j,nn; | 
|   | 
           char *vname; | 
|   | 
           odv=getoa(ob5,i+1); | 
|   | 
           nn = getoaSize(odv); | 
|   | 
           newRingp->partialEcart = nn; | 
|   | 
           newRingp->partialEcartGlobalVarX = (int *) sGC_malloc(sizeof(int)*nn+1); | 
|   | 
           if (newRingp->partialEcartGlobalVarX == NULL) errorKan1("%s\n","No more memory."); | 
|   | 
           for (j=0; j<nn; j++) | 
|   | 
             (newRingp->partialEcartGlobalVarX)[j] = -1; | 
|   | 
           for (j=0; j<nn; j++) { | 
|   | 
             ovv = getoa(odv,j); | 
|   | 
             if (ovv.tag != Sdollar) errorKan1("%s\n","partialEcartGlobalVarX: string is expected."); | 
|   | 
             vname = KopString(ovv); | 
|   | 
             for (k=0; k<n; k++) { | 
|   | 
               if (strcmp(vname,xvars[k]) == 0) { | 
|   | 
                 (newRingp->partialEcartGlobalVarX)[j] = k; break; | 
|   | 
               }else{ | 
|   | 
                 if (k == n-1) errorKan1("%s\n","partialEcartGlobalVarX: no such variable."); | 
|   | 
               } | 
|   | 
             } | 
|   | 
           } | 
|   | 
         } | 
|   | 
  | 
|          switch_function("grade","module1v"); | 
         switch_function("grade","module1v"); | 
|          /* Warning: grading is changed to module1v!! */ | 
         /* Warning: grading is changed to module1v!! */ | 
|        } else { | 
       } else { | 
| Line 3041  errorKan1(str,message) | 
 
  | 
| Line 3081  errorKan1(str,message) | 
 
 
 | 
|    extern char *GotoLabel; | 
   extern char *GotoLabel; | 
|    extern int GotoP; | 
   extern int GotoP; | 
|    extern int ErrorMessageMode; | 
   extern int ErrorMessageMode; | 
|   | 
   extern int RestrictedMode, RestrictedMode_saved; | 
|    char tmpc[1024]; | 
   char tmpc[1024]; | 
|   | 
   RestrictedMode = RestrictedMode_saved; | 
|    cancelAlarm(); | 
   cancelAlarm(); | 
|    if (ErrorMessageMode == 1 || ErrorMessageMode == 2) { | 
   if (ErrorMessageMode == 1 || ErrorMessageMode == 2) { | 
|      sprintf(tmpc,"\nERROR(kanExport[0|1].c): "); | 
     sprintf(tmpc,"\nERROR(kanExport[0|1].c): "); |