version 1.50, 2009/01/04 10:02:00 |
version 1.54, 2009/06/01 07:31:54 |
|
|
* 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/asir2000/builtin/dp-supp.c,v 1.49 2009/01/04 05:44:51 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/dp-supp.c,v 1.53 2009/01/07 05:33:18 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
Line 1701 int create_order_spec(VL vl,Obj obj,struct order_spec |
|
Line 1701 int create_order_spec(VL vl,Obj obj,struct order_spec |
|
return 1; |
return 1; |
} else if ( OID(obj) == O_LIST ) { |
} else if ( OID(obj) == O_LIST ) { |
node = BDY((LIST)obj); |
node = BDY((LIST)obj); |
|
if ( !BDY(node) || NUM(BDY(node)) ) { |
|
if ( length(node) < 2 ) |
|
error("create_order_spec : invalid argument"); |
|
create_order_spec(0,(Obj)BDY(NEXT(node)),&spec); |
|
spec->id += 256; spec->obj = obj; |
|
spec->ispot = (BDY(node)!=0); |
|
if ( spec->ispot ) { |
|
n = QTOS((Q)BDY(node)); |
|
if ( n < 0 ) |
|
spec->pot_nelim = -n; |
|
else |
|
spec->pot_nelim = 0; |
|
} |
|
*specp = spec; |
|
return 1; |
|
} |
|
|
for ( n = 0, t = node; t; t = NEXT(t), n++ ); |
for ( n = 0, t = node; t; t = NEXT(t), n++ ); |
l = (struct order_pair *)MALLOC_ATOMIC(n*sizeof(struct order_pair)); |
l = (struct order_pair *)MALLOC_ATOMIC(n*sizeof(struct order_pair)); |
for ( i = 0, t = node, s = 0; i < n; t = NEXT(t), i++ ) { |
for ( i = 0, t = node, s = 0; i < n; t = NEXT(t), i++ ) { |
Line 1722 int create_order_spec(VL vl,Obj obj,struct order_spec |
|
Line 1739 int create_order_spec(VL vl,Obj obj,struct order_spec |
|
spec->nv = col; spec->ord.matrix.row = row; |
spec->nv = col; spec->ord.matrix.row = row; |
spec->ord.matrix.matrix = w; |
spec->ord.matrix.matrix = w; |
return 1; |
return 1; |
} else if ( OID(obj) == O_VECT ) { |
|
v = (VECT)obj; bv = BDY(v); |
|
if ( v->len < 2 ) error("create_order_spec : invalid argument"); |
|
create_order_spec(0,(Obj)bv[1],&spec); |
|
spec->id += 256; spec->obj = obj; |
|
spec->istop = bv[0]==0; |
|
*specp = spec; |
|
return 1; |
|
} else |
} else |
return 0; |
return 0; |
} |
} |
Line 2202 void homogenize_order(struct order_spec *old,int n,str |
|
Line 2211 void homogenize_order(struct order_spec *old,int n,str |
|
new->id = old->id; new->nv = n+1; |
new->id = old->id; new->nv = n+1; |
new->ord.block.order_pair = l; |
new->ord.block.order_pair = l; |
new->ord.block.length = length+1; |
new->ord.block.length = length+1; |
new->istop = old->istop; |
new->ispot = old->ispot; |
break; |
break; |
case 2: case 258: |
case 2: case 258: |
nv = old->nv; row = old->ord.matrix.row; |
nv = old->nv; row = old->ord.matrix.row; |
Line 2216 void homogenize_order(struct order_spec *old,int n,str |
|
Line 2225 void homogenize_order(struct order_spec *old,int n,str |
|
} |
} |
new->id = old->id; new->nv = nv+1; |
new->id = old->id; new->nv = nv+1; |
new->ord.matrix.row = row+1; new->ord.matrix.matrix = newm; |
new->ord.matrix.row = row+1; new->ord.matrix.matrix = newm; |
new->istop = old->istop; |
new->ispot = old->ispot; |
break; |
break; |
case 3: case 259: |
case 3: case 259: |
onv = old->nv; |
onv = old->nv; |
Line 2256 void homogenize_order(struct order_spec *old,int n,str |
|
Line 2265 void homogenize_order(struct order_spec *old,int n,str |
|
new->nv = nnv; |
new->nv = nnv; |
new->ord.composite.length = nlen; |
new->ord.composite.length = nlen; |
new->ord.composite.w_or_b = nwb; |
new->ord.composite.w_or_b = nwb; |
new->istop = old->istop; |
new->ispot = old->ispot; |
print_composite_order_spec(new); |
print_composite_order_spec(new); |
break; |
break; |
case 256: /* simple module order */ |
case 256: /* simple module order */ |
Line 2277 void homogenize_order(struct order_spec *old,int n,str |
|
Line 2286 void homogenize_order(struct order_spec *old,int n,str |
|
default: |
default: |
error("homogenize_order : invalid input"); |
error("homogenize_order : invalid input"); |
} |
} |
new->istop = old->istop; |
new->ispot = old->ispot; |
break; |
break; |
default: |
default: |
error("homogenize_order : invalid input"); |
error("homogenize_order : invalid input"); |