version 1.11, 2004/06/21 00:58:32 |
version 1.12, 2004/12/18 16:50:10 |
|
|
* 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/parse/util.c,v 1.10 2003/08/23 01:42:53 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/util.c,v 1.11 2004/06/21 00:58:32 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
|
|
NODE ind; |
NODE ind; |
pointer *vp; |
pointer *vp; |
{ |
{ |
Obj len,row,col; |
Obj len,row,col,trg; |
int i; |
int i; |
NODE n,n0; |
NODE n,n0; |
VECT v; |
VECT v; |
|
|
a = (pointer)v; |
a = (pointer)v; |
} |
} |
break; |
break; |
|
case O_IMAT: |
|
row = (Obj)BDY(ind); |
|
ind = NEXT(ind); |
|
col = (Obj)BDY(ind); |
|
if ( ((IMAT)a)->row < QTOS((Q)row) || |
|
((IMAT)a)->col < QTOS((Q)col) || |
|
(QTOS((Q)row) < 0) || (QTOS((Q)col) < 0)) |
|
error("putarray : Out of range"); |
|
GetIbody((IMAT)a, QTOS((Q)row), QTOS((Q)col), (Obj)&trg); |
|
a = (pointer)trg; |
|
break; |
case O_LIST: |
case O_LIST: |
n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind)); |
n0 = BDY((LIST)a); i = QTOS((Q)BDY(ind)); |
if ( i < 0 ) |
if ( i < 0 ) |
|
|
BDY((MAT)a)[QTOS((Q)row)][QTOS((Q)col)] = b; |
BDY((MAT)a)[QTOS((Q)row)][QTOS((Q)col)] = b; |
} else |
} else |
error("putarray : invalid assignment"); |
error("putarray : invalid assignment"); |
|
break; |
|
case O_IMAT: |
|
row = (Obj)BDY(ind); |
|
ind = NEXT(ind); |
|
col = (Obj)BDY(ind); |
|
if ( ((IMAT)a)->row < QTOS((Q)row) || |
|
((IMAT)a)->col < QTOS((Q)col) || |
|
(QTOS((Q)row) < 0) || (QTOS((Q)col) < 0)) |
|
error("putarray : Out of range"); |
|
PutIent((IMAT)a, QTOS((Q)row), QTOS((Q)col), (Obj)b); |
break; |
break; |
case O_LIST: |
case O_LIST: |
if ( NEXT(ind) ) { |
if ( NEXT(ind) ) { |