[BACK]Return to dp-supp.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / builtin

Diff for /OpenXM_contrib2/asir2018/builtin/dp-supp.c between version 1.14 and 1.17

version 1.14, 2020/07/02 09:24:16 version 1.17, 2020/12/15 07:40:09
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2018/builtin/dp-supp.c,v 1.13 2019/12/27 08:13:59 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/builtin/dp-supp.c,v 1.16 2020/12/05 03:27:20 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
Line 2762  int create_order_spec(VL vl,Obj obj,struct order_spec 
Line 2762  int create_order_spec(VL vl,Obj obj,struct order_spec 
             spec->pot_nelim = 0;              spec->pot_nelim = 0;
         break;          break;
   
       case 3: /* [n,[wv,wm],ord] */        case 3: /* [n,[mlist1,mlist2,...],ord] or [n,[wv,wm],ord] */
         spec->module_ordtype = ZTOS((Z)BDY(node));          spec->module_ordtype = ZTOS((Z)BDY(node));
         if ( spec->module_ordtype < 0  ) {          if ( spec->module_ordtype < 0  ) {
             spec->pot_nelim = -spec->module_ordtype;              spec->pot_nelim = -spec->module_ordtype;
Line 3338  void dp_mod(DP p,int mod,NODE subst,DP *rp)
Line 3338  void dp_mod(DP p,int mod,NODE subst,DP *rp)
   }    }
 }  }
   
   void dpm_mod(DPM p,int mod,DPM *rp)
   {
     DMM m,mr,mr0;
     P t;
     V v;
     NODE tn;
   
     if ( !p )
       *rp = 0;
     else {
       for ( mr0 = 0, m = BDY(p); m; m = NEXT(m) ) {
         ptomp(mod,(P)m->c,&t);
         if ( t ) {
           NEXTDMM(mr0,mr); mr->c = (Obj)t; mr->dl = m->dl;
         }
       }
       if ( mr0 ) {
         NEXT(mr) = 0; MKDPM(p->nv,mr0,*rp); (*rp)->sugar = p->sugar;
       } else
         *rp = 0;
     }
   }
   
 void dp_rat(DP p,DP *rp)  void dp_rat(DP p,DP *rp)
 {  {
   MP m,mr,mr0;    MP m,mr,mr0;
Line 3637  void dpm_rest(DPM p,DPM *rp)
Line 3660  void dpm_rest(DPM p,DPM *rp)
     if ( *rp )      if ( *rp )
       (*rp)->sugar = p->sugar;        (*rp)->sugar = p->sugar;
   }    }
   }
   
   int dp_getdeg(DP p)
   {
     int max,n,i;
     MP m;
     int *d;
   
     if ( !p ) return 0;
     n = p->nv;
     max = 0;
     for ( m = BDY(p); m; m = NEXT(m) ) {
       d = m->dl->d;
       for ( i = 0; i < n; i++ )
         if ( d[i] > max ) max = d[i];
     }
     return max;
 }  }
   
 int dpm_getdeg(DPM p,int *r)  int dpm_getdeg(DPM p,int *r)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.17

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