[BACK]Return to nd.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / engine

Diff for /OpenXM_contrib2/asir2000/engine/nd.c between version 1.31 and 1.33

version 1.31, 2003/08/13 03:13:22 version 1.33, 2003/08/19 05:29:11
Line 1 
Line 1 
 /* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.30 2003/08/12 09:07:19 noro Exp $ */  /* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.32 2003/08/19 04:38:09 noro Exp $ */
   
 #include "ca.h"  #include "ca.h"
 #include "inline.h"  #include "inline.h"
Line 67  typedef struct oND_pairs {
Line 67  typedef struct oND_pairs {
         unsigned int lcm[1];          unsigned int lcm[1];
 } *ND_pairs;  } *ND_pairs;
   
   int (*nm_compare_function)(NM a,NM b);
   int (*nmv_compare_function)(NMV a,NMV b);
   int (*ndp_compare_function)(ND_pairs a,ND_pairs b);
   
 double nd_scale=2;  double nd_scale=2;
 static unsigned int **nd_bound;  static unsigned int **nd_bound;
 int nd_nvar;  int nd_nvar;
 int is_rlex;  int nd_isrlex;
 int nd_epw,nd_bpe,nd_wpd;  int nd_epw,nd_bpe,nd_wpd;
 unsigned int nd_mask[32];  unsigned int nd_mask[32];
 unsigned int nd_mask0,nd_mask1;  unsigned int nd_mask0,nd_mask1;
Line 81  ND_pairs _ndp_free_list;
Line 85  ND_pairs _ndp_free_list;
   
 static NDV *nd_ps;  static NDV *nd_ps;
 static NDV *nd_psq;  static NDV *nd_psq;
 int *nd_psl;  
 RHist *nd_psh;  RHist *nd_psh;
 int nd_psn,nd_pslen;  int nd_psn,nd_pslen;
   
Line 91  int nd_red_len;
Line 94  int nd_red_len;
 int nd_found,nd_create,nd_notfirst;  int nd_found,nd_create,nd_notfirst;
 int nm_adv;  int nm_adv;
 int nmv_adv;  int nmv_adv;
   int nd_degcompat;
   
 extern int Top,Reverse;  extern int Top,Reverse;
   
Line 104  extern int Top,Reverse;
Line 108  extern int Top,Reverse;
 #define TD(a) ((a)->td)  #define TD(a) ((a)->td)
 #define SG(a) ((a)->sugar)  #define SG(a) ((a)->sugar)
 #define LEN(a) ((a)->len)  #define LEN(a) ((a)->len)
   #define LCM(a) ((a)->lcm)
   
   #define NM_COMPARE(m1,m2)\
   (nd_degcompat?(TD(m1)>TD(m2)?1\
                              :(TD(m1)<TD(m2)?-1:ndl_compare(DL(m1),DL(m2))))\
               :(*nm_compare_function)(m1,m2))
   #define NMV_COMPARE(m1,m2)\
   (nd_degcompat?(TD(m1)>TD(m2)?1\
                              :(TD(m1)<TD(m2)?-1:ndl_compare(DL(m1),DL(m2))))\
               :(*nmv_compare_function)(m1,m2))
   #define NDP_COMPARE(m1,m2)\
   (nd_degcompat?(TD(m1)>TD(m2)?1\
                              :(TD(m1)<TD(m2)?-1:ndl_compare(LCM(m1),LCM(m2))))\
               :(*ndp_compare_function)(m1,m2))
 #define NM_ADV(m) (m = (NM)(((char *)m)+nm_adv))  #define NM_ADV(m) (m = (NM)(((char *)m)+nm_adv))
 #define NEWRHist(r) \  #define NEWRHist(r) \
 ((r)=(RHist)MALLOC(sizeof(struct oRHist)+(nd_wpd-1)*sizeof(unsigned int)))  ((r)=(RHist)MALLOC(sizeof(struct oRHist)+(nd_wpd-1)*sizeof(unsigned int)))
Line 125  if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
Line 142  if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
 #define NEXTND_pairs(r,c) \  #define NEXTND_pairs(r,c) \
 if(!(r)){NEWND_pairs(r);(c)=(r);}else{NEWND_pairs(NEXT(c));(c)=NEXT(c);}  if(!(r)){NEWND_pairs(r);(c)=(r);}else{NEWND_pairs(NEXT(c));(c)=NEXT(c);}
   
   void nd_init_ord(struct order_spec *spec);
 int nd_check_candidate(NODE input,NODE cand);  int nd_check_candidate(NODE input,NODE cand);
 void nd_removecont(int mod,ND p);  void nd_removecont(int mod,ND p);
 void nd_removecont2(ND p1,ND p2);  void nd_removecont2(ND p1,ND p2);
Line 346  int ndl_dehomogenize(unsigned int *d)
Line 364  int ndl_dehomogenize(unsigned int *d)
         unsigned int h;          unsigned int h;
         int i,bits;          int i,bits;
   
         if ( is_rlex ) {          if ( nd_isrlex ) {
                 if ( nd_bpe == 32 ) {                  if ( nd_bpe == 32 ) {
                         h = d[0];                          h = d[0];
                         for ( i = 1; i < nd_wpd; i++ )                          for ( i = 1; i < nd_wpd; i++ )
Line 454  INLINE int ndl_compare(unsigned int *d1,unsigned int *
Line 472  INLINE int ndl_compare(unsigned int *d1,unsigned int *
   
         for ( i = 0; i < nd_wpd; i++, d1++, d2++ )          for ( i = 0; i < nd_wpd; i++, d1++, d2++ )
                 if ( *d1 > *d2 )                  if ( *d1 > *d2 )
                         return is_rlex ? -1 : 1;                          return nd_isrlex ? -1 : 1;
                 else if ( *d1 < *d2 )                  else if ( *d1 < *d2 )
                         return is_rlex ? 1 : -1;                          return nd_isrlex ? 1 : -1;
         return 0;          return 0;
 }  }
   
Line 824  ND nd_add(int mod,ND p1,ND p2)
Line 842  ND nd_add(int mod,ND p1,ND p2)
         else {          else {
                 can = 0;                  can = 0;
                 for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2), mr0 = 0; m1 && m2; ) {                  for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2), mr0 = 0; m1 && m2; ) {
                         if ( TD(m1) > TD(m2) )                          c = NM_COMPARE(m1,m2);
                                 c = 1;  
                         else if ( TD(m1) < TD(m2) )  
                                 c = -1;  
                         else  
                                 c = ndl_compare(DL(m1),DL(m2));  
                         switch ( c ) {                          switch ( c ) {
                                 case 0:                                  case 0:
                                         t = ((CM(m1))+(CM(m2))) - mod;                                          t = ((CM(m1))+(CM(m2))) - mod;
Line 888  ND nd_add_q(ND p1,ND p2)
Line 901  ND nd_add_q(ND p1,ND p2)
         else {          else {
                 can = 0;                  can = 0;
                 for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2), mr0 = 0; m1 && m2; ) {                  for ( n = NV(p1), m1 = BDY(p1), m2 = BDY(p2), mr0 = 0; m1 && m2; ) {
                         if ( TD(m1) > TD(m2) )                          c = NM_COMPARE(m1,m2);
                                 c = 1;  
                         else if ( TD(m1) < TD(m2) )  
                                 c = -1;  
                         else  
                                 c = ndl_compare(DL(m1),DL(m2));  
                         switch ( c ) {                          switch ( c ) {
                                 case 0:                                  case 0:
                                         addq(CQ(m1),CQ(m2),&t);                                          addq(CQ(m1),CQ(m2),&t);
Line 1417  int head_pbucket(int mod,PGeoBucket g)
Line 1425  int head_pbucket(int mod,PGeoBucket g)
                         } else {                          } else {
                                 di = HDL(gi);                                  di = HDL(gi);
                                 nv = NV(gi);                                  nv = NV(gi);
                                 if ( HTD(gi) > HTD(gj) )                                  c = NM_COMPARE(BDY(gi),BDY(gj));
                                         c = 1;  
                                 else if ( HTD(gi) < HTD(gj) )  
                                         c = -1;  
                                 else  
                                         c = ndl_compare(di,dj);  
                                 if ( c > 0 ) {                                  if ( c > 0 ) {
                                         if ( sum )                                          if ( sum )
                                                 HCM(gj) = sum;                                                  HCM(gj) = sum;
Line 1471  int head_pbucket_q(PGeoBucket g)
Line 1474  int head_pbucket_q(PGeoBucket g)
                         } else {                          } else {
                                 di = HDL(gi);                                  di = HDL(gi);
                                 nv = NV(gi);                                  nv = NV(gi);
                                 if ( HTD(gi) > HTD(gj) )                                  c = NM_COMPARE(BDY(gi),BDY(gj));
                                         c = 1;  
                                 else if ( HTD(gi) < HTD(gj) )  
                                         c = -1;  
                                 else  
                                         c = ndl_compare(di,dj);  
                                 if ( c > 0 ) {                                  if ( c > 0 ) {
                                         if ( sum )                                          if ( sum )
                                                 HCQ(gj) = sum;                                                  HCQ(gj) = sum;
Line 1630  again:
Line 1628  again:
   
 int ndv_compare(NDV *p1,NDV *p2)  int ndv_compare(NDV *p1,NDV *p2)
 {  {
         int td1,td2;          return NMV_COMPARE(BDY(*p1),BDY(*p2));
   
         td1 = HTD(*p1); td2 = HTD(*p2);  
         if ( td1 > td2 ) return 1;  
         else if ( td1 < td2 ) return -1;  
         else return ndl_compare(HDL(*p1),HDL(*p2));  
 }  }
   
 int ndv_compare_rev(NDV *p1,NDV *p2)  int ndv_compare_rev(NDV *p1,NDV *p2)
 {  {
         return -ndv_compare(p1,p2);          return -NMV_COMPARE(BDY(*p1),BDY(*p2));
 }  }
   
 NODE nd_reduceall(int m,NODE f)  NODE nd_reduceall(int m,NODE f)
Line 1920  ND_pairs nd_minp( ND_pairs d, ND_pairs *prest )
Line 1913  ND_pairs nd_minp( ND_pairs d, ND_pairs *prest )
 {  {
         ND_pairs m,ml,p,l;          ND_pairs m,ml,p,l;
         unsigned int *lcm;          unsigned int *lcm;
         int s,td,len,tlen,c;          int s,td,len,tlen,c,c1;
   
         if ( !(p = NEXT(m = d)) ) {          if ( !(p = NEXT(m = d)) ) {
                 *prest = p;                  *prest = p;
                 NEXT(m) = 0;                  NEXT(m) = 0;
                 return m;                  return m;
         }          }
         lcm = m->lcm;  
         s = SG(m);          s = SG(m);
         td = TD(m);          for ( ml = 0, l = m; p; p = NEXT(l = p) )
         len = nd_psl[m->i1]+nd_psl[m->i2];                  if ( (SG(p) < s) || ((SG(p) == s) && (NDP_COMPARE(p,m) < 0)) ) {
         for ( ml = 0, l = m; p; p = NEXT(l = p) ) {                          ml = l;
                 if (SG(p) < s)                          m = p;
                         goto find;                          s = SG(m);
                 else if ( SG(p) == s ) {  
                         if ( TD(p) < td )  
                                 goto find;  
                         else if ( TD(p) == td ) {  
                                 c = ndl_compare(p->lcm,lcm);  
                                 if ( c < 0 )  
                                         goto find;  
                         }  
                 }                  }
                 continue;  
 find:  
                 ml = l;  
                 m = p;  
                 lcm = m->lcm;  
                 s = SG(m);  
                 td = TD(m);  
                 len = tlen;  
         }  
         if ( !ml ) *prest = NEXT(m);          if ( !ml ) *prest = NEXT(m);
         else {          else {
                 NEXT(ml) = NEXT(m);                  NEXT(ml) = NEXT(m);
Line 1969  int nd_newps(int mod,ND a)
Line 1944  int nd_newps(int mod,ND a)
   
         if ( nd_psn == nd_pslen ) {          if ( nd_psn == nd_pslen ) {
                 nd_pslen *= 2;                  nd_pslen *= 2;
                 nd_psl = (int *)REALLOC((char *)nd_psl,nd_pslen*sizeof(int));  
                 nd_ps = (NDV *)REALLOC((char *)nd_ps,nd_pslen*sizeof(NDV));                  nd_ps = (NDV *)REALLOC((char *)nd_ps,nd_pslen*sizeof(NDV));
                 nd_psq = (NDV *)REALLOC((char *)nd_psq,nd_pslen*sizeof(NDV));                  nd_psq = (NDV *)REALLOC((char *)nd_psq,nd_pslen*sizeof(NDV));
                 nd_psh = (RHist *)REALLOC((char *)nd_psh,nd_pslen*sizeof(RHist));                  nd_psh = (RHist *)REALLOC((char *)nd_psh,nd_pslen*sizeof(RHist));
Line 1986  int nd_newps(int mod,ND a)
Line 1960  int nd_newps(int mod,ND a)
                 nd_ps[nd_psn] = b;                  nd_ps[nd_psn] = b;
         else          else
                 nd_psq[nd_psn] = b;                  nd_psq[nd_psn] = b;
         nd_psl[nd_psn] = len;  
         nd_free(a);          nd_free(a);
         return nd_psn++;          return nd_psn++;
 }  }
Line 1999  int nd_newps_trace(int mod,ND nf,ND nfq)
Line 1972  int nd_newps_trace(int mod,ND nf,ND nfq)
   
         if ( nd_psn == nd_pslen ) {          if ( nd_psn == nd_pslen ) {
                 nd_pslen *= 2;                  nd_pslen *= 2;
                 nd_psl = (int *)REALLOC((char *)nd_psl,nd_pslen*sizeof(int));  
                 nd_ps = (NDV *)REALLOC((char *)nd_ps,nd_pslen*sizeof(NDV));                  nd_ps = (NDV *)REALLOC((char *)nd_ps,nd_pslen*sizeof(NDV));
                 nd_psq = (NDV *)REALLOC((char *)nd_psq,nd_pslen*sizeof(NDV));                  nd_psq = (NDV *)REALLOC((char *)nd_psq,nd_pslen*sizeof(NDV));
                 nd_psh = (RHist *)REALLOC((char *)nd_psh,nd_pslen*sizeof(RHist));                  nd_psh = (RHist *)REALLOC((char *)nd_psh,nd_pslen*sizeof(RHist));
Line 2016  int nd_newps_trace(int mod,ND nf,ND nfq)
Line 1988  int nd_newps_trace(int mod,ND nf,ND nfq)
         nd_bound[nd_psn] = nd_compute_bound(nfq);          nd_bound[nd_psn] = nd_compute_bound(nfq);
         NEWRHist(r); SG(r) = SG(nf); TD(r) = HTD(nf); ndl_copy(HDL(nf),DL(r));          NEWRHist(r); SG(r) = SG(nf); TD(r) = HTD(nf); ndl_copy(HDL(nf),DL(r));
         nd_psh[nd_psn] = r;          nd_psh[nd_psn] = r;
   
         len = LEN(nd_psq[nd_psn]);  
         nd_psl[nd_psn] = len;  
   
         nd_free(nf); nd_free(nfq);          nd_free(nf); nd_free(nfq);
         return nd_psn++;          return nd_psn++;
 }  }
Line 2035  void nd_setup(int mod,NODE f)
Line 2003  void nd_setup(int mod,NODE f)
         nd_found = 0; nd_notfirst = 0; nd_create = 0;          nd_found = 0; nd_notfirst = 0; nd_create = 0;
   
         nd_psn = length(f); nd_pslen = 2*nd_psn;          nd_psn = length(f); nd_pslen = 2*nd_psn;
         nd_psl = (int *)MALLOC(nd_pslen*sizeof(int));  
         nd_ps = (NDV *)MALLOC(nd_pslen*sizeof(NDV));          nd_ps = (NDV *)MALLOC(nd_pslen*sizeof(NDV));
         nd_psq = (NDV *)MALLOC(nd_pslen*sizeof(NDV));          nd_psq = (NDV *)MALLOC(nd_pslen*sizeof(NDV));
         nd_psh = (RHist *)MALLOC(nd_pslen*sizeof(RHist));          nd_psh = (RHist *)MALLOC(nd_pslen*sizeof(RHist));
Line 2090  void nd_setup_trace(int mod,NODE f)
Line 2057  void nd_setup_trace(int mod,NODE f)
         nd_found = 0; nd_notfirst = 0; nd_create = 0;          nd_found = 0; nd_notfirst = 0; nd_create = 0;
   
         nd_psn = length(f); nd_pslen = 2*nd_psn;          nd_psn = length(f); nd_pslen = 2*nd_psn;
         nd_psl = (int *)MALLOC(nd_pslen*sizeof(int));  
         nd_ps = (NDV *)MALLOC(nd_pslen*sizeof(NDV));          nd_ps = (NDV *)MALLOC(nd_pslen*sizeof(NDV));
         nd_psq = (NDV *)MALLOC(nd_pslen*sizeof(NDV));          nd_psq = (NDV *)MALLOC(nd_pslen*sizeof(NDV));
         nd_psh = (RHist *)MALLOC(nd_pslen*sizeof(RHist));          nd_psh = (RHist *)MALLOC(nd_pslen*sizeof(RHist));
Line 2139  void nd_gr(LIST f,LIST v,int m,struct order_spec *ord,
Line 2105  void nd_gr(LIST f,LIST v,int m,struct order_spec *ord,
   
         get_vars((Obj)f,&fv); pltovl(v,&vv);          get_vars((Obj)f,&fv); pltovl(v,&vv);
         nd_nvar = length(vv);          nd_nvar = length(vv);
         if ( ord->id )          nd_init_ord(ord);
                 error("nd_gr : unsupported order");          /* XXX for DP */
         switch ( ord->ord.simple ) {  
                 case 0:  
                         is_rlex = 1;  
                         break;  
                 case 1:  
                         is_rlex = 0;  
                         break;  
                 default:  
                         error("nd_gr : unsupported order");  
         }  
         initd(ord);          initd(ord);
         for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) {          for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) {
                 ptod(CO,vv,(P)BDY(t),&b);                  ptod(CO,vv,(P)BDY(t),&b);
Line 2186  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
Line 2142  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
   
         get_vars((Obj)f,&fv); pltovl(v,&vv);          get_vars((Obj)f,&fv); pltovl(v,&vv);
         nd_nvar = length(vv);          nd_nvar = length(vv);
         if ( ord->id )  
                 error("nd_gr : unsupported order");  
         initd(ord);          initd(ord);
         if ( homo ) {          if ( homo ) {
                 homogenize_order(ord,nd_nvar,&ord1);                  homogenize_order(ord,nd_nvar,&ord1);
                 switch ( ord1.ord.simple ) {  
                         case 0: is_rlex = 1; break;  
                         case 1: is_rlex = 0; break;  
                         default: error("nd_gr : unsupported order");  
                 }  
                 for ( fd0 = 0, in0 = 0, t = BDY(f); t; t = NEXT(t) ) {                  for ( fd0 = 0, in0 = 0, t = BDY(f); t; t = NEXT(t) ) {
                         ptod(CO,vv,(P)BDY(t),&c);                          ptod(CO,vv,(P)BDY(t),&c);
                         if ( c ) {                          if ( c ) {
Line 2205  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
Line 2154  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
                 }                  }
                 if ( fd0 ) NEXT(fd) = 0;                  if ( fd0 ) NEXT(fd) = 0;
                 if ( in0 ) NEXT(in) = 0;                  if ( in0 ) NEXT(in) = 0;
                   nd_init_ord(&ord1);
                 initd(&ord1);                  initd(&ord1);
                 nd_nvar++;                  nd_nvar++;
         } else {          } else {
                 switch ( ord->ord.simple ) {  
                         case 0: is_rlex = 1; break;  
                         case 1: is_rlex = 0; break;  
                         default: error("nd_gr : unsupported order");  
                 }  
                 for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) {                  for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) {
                         ptod(CO,vv,(P)BDY(t),&c);                          ptod(CO,vv,(P)BDY(t),&c);
                         if ( c ) {                          if ( c ) {
Line 2221  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
Line 2166  void nd_gr_trace(LIST f,LIST v,int m,int homo,struct o
                 }                  }
                 if ( fd0 ) NEXT(fd) = 0;                  if ( fd0 ) NEXT(fd) = 0;
                 in0 = fd0;                  in0 = fd0;
                   nd_init_ord(ord);
         }          }
         do {          do {
                 nd_setup_trace(m,fd0);                  nd_setup_trace(m,fd0);
Line 2261  void dltondl(int n,DL dl,unsigned int *r)
Line 2207  void dltondl(int n,DL dl,unsigned int *r)
   
         d = dl->d;          d = dl->d;
         bzero(r,nd_wpd*sizeof(unsigned int));          bzero(r,nd_wpd*sizeof(unsigned int));
         if ( is_rlex )          if ( nd_isrlex )
                 for ( i = 0; i < n; i++ )                  for ( i = 0; i < n; i++ )
                         r[(n-1-i)/nd_epw] |= (d[i]<<((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe));                          r[(n-1-i)/nd_epw] |= (d[i]<<((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe));
         else          else
Line 2278  DL ndltodl(int n,int td,unsigned int *ndl)
Line 2224  DL ndltodl(int n,int td,unsigned int *ndl)
         NEWDL(dl,n);          NEWDL(dl,n);
         TD(dl) = td;          TD(dl) = td;
         d = dl->d;          d = dl->d;
         if ( is_rlex )          if ( nd_isrlex )
                 for ( i = 0; i < n; i++ )                  for ( i = 0; i < n; i++ )
                         d[i] = (ndl[(n-1-i)/nd_epw]>>((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe))                          d[i] = (ndl[(n-1-i)/nd_epw]>>((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe))
                                 &((1<<nd_bpe)-1);                                  &((1<<nd_bpe)-1);
Line 2347  void ndl_print(unsigned int *dl)
Line 2293  void ndl_print(unsigned int *dl)
   
         n = nd_nvar;          n = nd_nvar;
         printf("<<");          printf("<<");
         if ( is_rlex )          if ( nd_isrlex )
                 for ( i = 0; i < n; i++ )                  for ( i = 0; i < n; i++ )
                         printf(i==n-1?"%d":"%d,",                          printf(i==n-1?"%d":"%d,",
                                 (dl[(n-1-i)/nd_epw]>>((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe))                                  (dl[(n-1-i)/nd_epw]>>((nd_epw-((n-1-i)%nd_epw)-1)*nd_bpe))
Line 2791  void ndl_dup(int obpe,unsigned int *d,unsigned int *r)
Line 2737  void ndl_dup(int obpe,unsigned int *d,unsigned int *r)
         cbpe = nd_bpe;          cbpe = nd_bpe;
         for ( i = 0; i < nd_wpd; i++ )          for ( i = 0; i < nd_wpd; i++ )
                 r[i] = 0;                  r[i] = 0;
         if ( is_rlex )          if ( nd_isrlex )
                 for ( i = 0; i < n; i++ ) {                  for ( i = 0; i < n; i++ ) {
                         ei = (d[(n-1-i)/oepw]>>((oepw-((n-1-i)%oepw)-1)*obpe))                          ei = (d[(n-1-i)/oepw]>>((oepw-((n-1-i)%oepw)-1)*obpe))
                                 &((1<<obpe)-1);                                  &((1<<obpe)-1);
Line 3155  NODE nd_reducebase(NODE x)
Line 3101  NODE nd_reducebase(NODE x)
         NEXT(t) = 0; x = t0;          NEXT(t) = 0; x = t0;
         return x;          return x;
 }  }
   
   void nd_init_ord(struct order_spec *ord)
   {
           if ( ord->id )
                   error("nd_gr : unsupported order");
           nd_degcompat = 0;
           switch ( ord->ord.simple ) {
                   case 0:
                           nd_degcompat = 1;
                           nd_isrlex = 1;
                           break;
                   case 1:
                           nd_degcompat = 1;
                           nd_isrlex = 0;
                           break;
                   default:
                           error("nd_gr : unsupported order");
           }
   }
   

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.33

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