version 1.2, 2018/09/28 08:20:29 |
version 1.5, 2020/10/06 06:31:20 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* 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/io/cio.c,v 1.1 2018/09/19 05:45:08 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/io/cio.c,v 1.4 2020/02/22 06:23:36 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 89 void write_cmo(FILE *s,Obj obj) |
|
Line 89 void write_cmo(FILE *s,Obj obj) |
|
int r; |
int r; |
char errmsg[BUFSIZ]; |
char errmsg[BUFSIZ]; |
LIST l; |
LIST l; |
|
QUOTE quote; |
|
|
if ( !obj ) { |
if ( !obj ) { |
r = CMO_NULL; write_int(s,&r); |
r = CMO_NULL; write_int(s,(unsigned int *)&r); |
return; |
return; |
} |
} |
switch ( OID(obj) ) { |
switch ( OID(obj) ) { |
Line 144 void write_cmo(FILE *s,Obj obj) |
|
Line 145 void write_cmo(FILE *s,Obj obj) |
|
write_cmo_bytearray(s,(BYTEARRAY)obj); |
write_cmo_bytearray(s,(BYTEARRAY)obj); |
break; |
break; |
case O_VOID: |
case O_VOID: |
r = ((USINT)obj)->body; write_int(s,&r); |
r = ((USINT)obj)->body; write_int(s,(unsigned int *)&r); |
break; |
break; |
case O_QUOTE: |
case O_QUOTE: |
fnodetotree(BDY((QUOTE)obj),&l); |
quote = (QUOTE)obj; |
|
fnodetotree(BDY(quote),quote->pvs,&l); |
write_cmo_tree(s,l); |
write_cmo_tree(s,l); |
break; |
break; |
case O_MAT: |
case O_MAT: |
Line 211 void write_cmo_mathcap(FILE *s,MATHCAP mc) |
|
Line 213 void write_cmo_mathcap(FILE *s,MATHCAP mc) |
|
{ |
{ |
unsigned int r; |
unsigned int r; |
|
|
r = CMO_MATHCAP; write_int(s,&r); |
r = CMO_MATHCAP; write_int(s,(unsigned int *)&r); |
write_cmo(s,(Obj)BDY(mc)); |
write_cmo(s,(Obj)BDY(mc)); |
} |
} |
|
|
Line 219 void write_cmo_uint(FILE *s,USINT ui) |
|
Line 221 void write_cmo_uint(FILE *s,USINT ui) |
|
{ |
{ |
unsigned int r; |
unsigned int r; |
|
|
r = CMO_INT32; write_int(s,&r); |
r = CMO_INT32; write_int(s,(unsigned int *)&r); |
r = ui->body; write_int(s,&r); |
r = ui->body; write_int(s,(unsigned int *)&r); |
} |
} |
|
|
void write_cmo_q(FILE *s,Q q) |
void write_cmo_q(FILE *s,Q q) |
Line 229 void write_cmo_q(FILE *s,Q q) |
|
Line 231 void write_cmo_q(FILE *s,Q q) |
|
Z nm,dn; |
Z nm,dn; |
|
|
if ( q && !INT(q) ) { |
if ( q && !INT(q) ) { |
r = CMO_QQ; write_int(s,&r); |
r = CMO_QQ; write_int(s,(unsigned int *)&r); |
nmq(q,&nm); |
nmq(q,&nm); |
write_cmo_zz(s,nm); |
write_cmo_zz(s,nm); |
nmq(q,&dn); |
dnq(q,&dn); |
write_cmo_zz(s,dn); |
write_cmo_zz(s,dn); |
} else { |
} else { |
r = CMO_ZZ; write_int(s,&r); |
r = CMO_ZZ; write_int(s,(unsigned int *)&r); |
write_cmo_zz(s,(Z)q); |
write_cmo_zz(s,(Z)q); |
} |
} |
} |
} |
Line 245 void write_cmo_real(FILE *s,Real real) |
|
Line 247 void write_cmo_real(FILE *s,Real real) |
|
unsigned int r; |
unsigned int r; |
double dbl; |
double dbl; |
|
|
r = CMO_IEEE_DOUBLE_FLOAT; write_int(s,&r); |
r = CMO_IEEE_DOUBLE_FLOAT; write_int(s,(unsigned int *)&r); |
dbl = real->body; write_double(s,&dbl); |
dbl = real->body; write_double(s,&dbl); |
} |
} |
|
|
Line 255 void write_cmo_bf(FILE *s,BF bf) |
|
Line 257 void write_cmo_bf(FILE *s,BF bf) |
|
int len_r,len; |
int len_r,len; |
unsigned int *ptr; |
unsigned int *ptr; |
|
|
r = CMO_BIGFLOAT32; write_int(s,&r); |
r = CMO_BIGFLOAT32; write_int(s,(unsigned int *)&r); |
r = MPFR_PREC(bf->body); write_int(s,&r); |
r = MPFR_PREC(bf->body); write_int(s,(unsigned int *)&r); |
r = MPFR_SIGN(bf->body); write_int(s,&r); |
r = MPFR_SIGN(bf->body); write_int(s,(unsigned int *)&r); |
r = MPFR_EXP(bf->body); write_int(s,&r); |
r = MPFR_EXP(bf->body); write_int(s,(unsigned int *)&r); |
len_r = MPFR_LIMB_SIZE_REAL(bf->body); |
len_r = MPFR_LIMB_SIZE_REAL(bf->body); |
len = MPFR_LIMB_SIZE_BODY(bf->body); |
len = MPFR_LIMB_SIZE_BODY(bf->body); |
write_int(s,&len); |
write_int(s,(unsigned int *)&len); |
ptr = (unsigned int *)MPFR_MANT(bf->body); |
ptr = (unsigned int *)MPFR_MANT(bf->body); |
write_intarray(s,ptr+(len_r-len),len); |
write_intarray(s,ptr+(len_r-len),len); |
} |
} |
Line 274 void write_cmo_zz(FILE *s,Z n) |
|
Line 276 void write_cmo_zz(FILE *s,Z n) |
|
|
|
b = (int *)mpz_export(0,&l,-1,sizeof(int),0,0,BDY(n)); |
b = (int *)mpz_export(0,&l,-1,sizeof(int),0,0,BDY(n)); |
bytes = sgnz(n)*l; |
bytes = sgnz(n)*l; |
write_int(s,&bytes); |
write_int(s,(unsigned int *)&bytes); |
write_intarray(s,b,l); |
write_intarray(s,(unsigned int *)b,l); |
} |
} |
|
|
void write_cmo_p(FILE *s,P p) |
void write_cmo_p(FILE *s,P p) |
Line 285 void write_cmo_p(FILE *s,P p) |
|
Line 287 void write_cmo_p(FILE *s,P p) |
|
char *namestr; |
char *namestr; |
STRING name; |
STRING name; |
|
|
r = CMO_RECURSIVE_POLYNOMIAL; write_int(s,&r); |
r = CMO_RECURSIVE_POLYNOMIAL; write_int(s,(unsigned int *)&r); |
get_vars((Obj)p,&vl); |
get_vars((Obj)p,&vl); |
|
|
/* indeterminate list */ |
/* indeterminate list */ |
r = CMO_LIST; write_int(s,&r); |
r = CMO_LIST; write_int(s,(unsigned int *)&r); |
for ( t = vl, i = 0; t; t = NEXT(t), i++ ); |
for ( t = vl, i = 0; t; t = NEXT(t), i++ ); |
write_int(s,&i); |
write_int(s,(unsigned int *)&i); |
r = CMO_INDETERMINATE; |
r = CMO_INDETERMINATE; |
for ( t = vl; t; t = NEXT(t) ) { |
for ( t = vl; t; t = NEXT(t) ) { |
write_int(s,&r); |
write_int(s,(unsigned int *)&r); |
/* localname_to_cmoname(NAME(t->v),&namestr); */ |
/* localname_to_cmoname(NAME(t->v),&namestr); */ |
namestr = NAME(t->v); |
namestr = NAME(t->v); |
MKSTR(name,namestr); |
MKSTR(name,namestr); |
Line 315 void write_cmo_upoly(FILE *s,VL vl,P p) |
|
Line 317 void write_cmo_upoly(FILE *s,VL vl,P p) |
|
if ( NUM(p) ) |
if ( NUM(p) ) |
write_cmo(s,(Obj)p); |
write_cmo(s,(Obj)p); |
else { |
else { |
r = CMO_UNIVARIATE_POLYNOMIAL; write_int(s,&r); |
r = CMO_UNIVARIATE_POLYNOMIAL; write_int(s,(unsigned int *)&r); |
v = VR(p); |
v = VR(p); |
dc = DC(p); |
dc = DC(p); |
for ( i = 0, dct = dc; dct; dct = NEXT(dct), i++ ); |
for ( i = 0, dct = dc; dct; dct = NEXT(dct), i++ ); |
write_int(s,&i); |
write_int(s,(unsigned int *)&i); |
for ( i = 0, vlt = vl; vlt->v != v; vlt = NEXT(vlt), i++ ); |
for ( i = 0, vlt = vl; vlt->v != v; vlt = NEXT(vlt), i++ ); |
write_int(s,&i); |
write_int(s,(unsigned int *)&i); |
for ( dct = dc; dct; dct = NEXT(dct) ) { |
for ( dct = dc; dct; dct = NEXT(dct) ) { |
i = ZTOS(DEG(dct)); write_int(s,&i); |
i = ZTOS(DEG(dct)); write_int(s,(unsigned int *)&i); |
write_cmo_upoly(s,vl,COEF(dct)); |
write_cmo_upoly(s,vl,COEF(dct)); |
} |
} |
} |
} |
Line 333 void write_cmo_r(FILE *s,R f) |
|
Line 335 void write_cmo_r(FILE *s,R f) |
|
{ |
{ |
int r; |
int r; |
|
|
r = CMO_RATIONAL; write_int(s,&r); |
r = CMO_RATIONAL; write_int(s,(unsigned int *)&r); |
write_cmo(s,(Obj)NM(f)); |
write_cmo(s,(Obj)NM(f)); |
write_cmo(s,(Obj)DN(f)); |
write_cmo(s,(Obj)DN(f)); |
} |
} |
Line 342 void write_cmo_complex(FILE *s,C f) |
|
Line 344 void write_cmo_complex(FILE *s,C f) |
|
{ |
{ |
int r; |
int r; |
|
|
r = CMO_COMPLEX; write_int(s,&r); |
r = CMO_COMPLEX; write_int(s,(unsigned int *)&r); |
write_cmo(s,(Obj)f->r); |
write_cmo(s,(Obj)f->r); |
write_cmo(s,(Obj)f->i); |
write_cmo(s,(Obj)f->i); |
} |
} |
Line 353 void write_cmo_dp(FILE *s,DP dp) |
|
Line 355 void write_cmo_dp(FILE *s,DP dp) |
|
MP m; |
MP m; |
|
|
for ( n = 0, m = BDY(dp); m; m = NEXT(m), n++ ); |
for ( n = 0, m = BDY(dp); m; m = NEXT(m), n++ ); |
r = CMO_DISTRIBUTED_POLYNOMIAL; write_int(s,&r); |
r = CMO_DISTRIBUTED_POLYNOMIAL; write_int(s,(unsigned int *)&r); |
r = n; write_int(s,&r); |
r = n; write_int(s,(unsigned int *)&r); |
r = CMO_DMS_GENERIC; write_int(s,&r); |
r = CMO_DMS_GENERIC; write_int(s,(unsigned int *)&r); |
nv = dp->nv; |
nv = dp->nv; |
for ( i = 0, m = BDY(dp); i < n; i++, m = NEXT(m) ) |
for ( i = 0, m = BDY(dp); i < n; i++, m = NEXT(m) ) |
write_cmo_monomial(s,m,nv); |
write_cmo_monomial(s,m,nv); |
Line 366 void write_cmo_monomial(FILE *s,MP m,int n) |
|
Line 368 void write_cmo_monomial(FILE *s,MP m,int n) |
|
int i,r; |
int i,r; |
int *p; |
int *p; |
|
|
r = CMO_MONOMIAL32; write_int(s,&r); |
r = CMO_MONOMIAL32; write_int(s,(unsigned int *)&r); |
write_int(s,&n); |
write_int(s,(unsigned int *)&n); |
for ( i = 0, p = m->dl->d; i < n; i++ ) { |
for ( i = 0, p = m->dl->d; i < n; i++ ) { |
write_int(s,p++); |
write_int(s,(unsigned int *)p++); |
} |
} |
write_cmo_q(s,(Q)m->c); |
write_cmo_q(s,(Q)m->c); |
} |
} |
Line 380 void write_cmo_list(FILE *s,LIST list) |
|
Line 382 void write_cmo_list(FILE *s,LIST list) |
|
int i,n,r; |
int i,n,r; |
|
|
for ( n = 0, m = BDY(list); m; m = NEXT(m), n++ ); |
for ( n = 0, m = BDY(list); m; m = NEXT(m), n++ ); |
r = CMO_LIST; write_int(s,&r); |
r = CMO_LIST; write_int(s,(unsigned int *)&r); |
write_int(s,&n); |
write_int(s,(unsigned int *)&n); |
for ( i = 0, m = BDY(list); i < n; i++, m = NEXT(m) ) |
for ( i = 0, m = BDY(list); i < n; i++, m = NEXT(m) ) |
write_cmo(s,BDY(m)); |
write_cmo(s,BDY(m)); |
} |
} |
Line 390 void write_cmo_string(FILE *s,STRING str) |
|
Line 392 void write_cmo_string(FILE *s,STRING str) |
|
{ |
{ |
int r; |
int r; |
|
|
r = CMO_STRING; write_int(s,&r); |
r = CMO_STRING; write_int(s,(unsigned int *)&r); |
savestr(s,BDY(str)); |
savestr(s,BDY(str)); |
} |
} |
|
|
Line 398 void write_cmo_bytearray(FILE *s,BYTEARRAY array) |
|
Line 400 void write_cmo_bytearray(FILE *s,BYTEARRAY array) |
|
{ |
{ |
int r; |
int r; |
|
|
r = CMO_DATUM; write_int(s,&r); |
r = CMO_DATUM; write_int(s,(unsigned int *)&r); |
write_int(s,&array->len); |
write_int(s,(unsigned int *)&array->len); |
write_string(s,array->body,array->len); |
write_string(s,array->body,array->len); |
} |
} |
|
|
Line 407 void write_cmo_error(FILE *s,ERR e) |
|
Line 409 void write_cmo_error(FILE *s,ERR e) |
|
{ |
{ |
int r; |
int r; |
|
|
r = CMO_ERROR2; write_int(s,&r); |
r = CMO_ERROR2; write_int(s,(unsigned int *)&r); |
write_cmo(s,BDY(e)); |
write_cmo(s,BDY(e)); |
} |
} |
|
|
Line 432 void write_cmo_tree(FILE *s,LIST l) |
|
Line 434 void write_cmo_tree(FILE *s,LIST l) |
|
write_cmo(s,(Obj)BDY(n)); |
write_cmo(s,(Obj)BDY(n)); |
} else { |
} else { |
if ( strcmp(BDY(prop),"list") ) { |
if ( strcmp(BDY(prop),"list") ) { |
r = CMO_TREE; write_int(s,&r); |
r = CMO_TREE; write_int(s,(unsigned int *)&r); |
name = (STRING)BDY(n); |
name = (STRING)BDY(n); |
n = NEXT(n); |
n = NEXT(n); |
/* function name */ |
/* function name */ |
write_cmo(s,(Obj)name); |
write_cmo(s,(Obj)name); |
|
|
/* attribute list */ |
/* attribute list */ |
r = CMO_LIST; write_int(s,&r); |
r = CMO_LIST; write_int(s,(unsigned int *)&r); |
r = 2; write_int(s,&r); |
r = 2; write_int(s,(unsigned int *)&r); |
MKSTR(key,"asir"); |
MKSTR(key,"asir"); |
write_cmo(s,(Obj)key); |
write_cmo(s,(Obj)key); |
write_cmo(s,(Obj)prop); |
write_cmo(s,(Obj)prop); |
} |
} |
|
|
/* argument list */ |
/* argument list */ |
r = CMO_LIST; write_int(s,&r); |
r = CMO_LIST; write_int(s,(unsigned int *)&r); |
/* len = number of arguments */ |
/* len = number of arguments */ |
r = length(n); write_int(s,&r); |
r = length(n); write_int(s,(unsigned int *)&r); |
while ( n ) { |
while ( n ) { |
write_cmo_tree(s,BDY(n)); |
write_cmo_tree(s,BDY(n)); |
n = NEXT(n); |
n = NEXT(n); |
Line 464 void write_cmo_matrix_as_list(FILE *s,MAT a) |
|
Line 466 void write_cmo_matrix_as_list(FILE *s,MAT a) |
|
/* CMO_LIST row (CMO_LIST col a[0][0] ... a[0][col-1]) ... (CMO_LIST col a[row-1][0] ... a[row-1][col-1] */ |
/* CMO_LIST row (CMO_LIST col a[0][0] ... a[0][col-1]) ... (CMO_LIST col a[row-1][0] ... a[row-1][col-1] */ |
row = a->row; col = a->col; |
row = a->row; col = a->col; |
r = CMO_LIST; |
r = CMO_LIST; |
write_int(s,&r); |
write_int(s,(unsigned int *)&r); |
write_int(s,&row); |
write_int(s,(unsigned int *)&row); |
for ( i = 0; i < row; i++ ) { |
for ( i = 0; i < row; i++ ) { |
write_int(s,&r); |
write_int(s,(unsigned int *)&r); |
write_int(s,&col); |
write_int(s,(unsigned int *)&col); |
for ( j = 0; j < col; j++ ) |
for ( j = 0; j < col; j++ ) |
write_cmo(s,a->body[i][j]); |
write_cmo(s,a->body[i][j]); |
} |
} |
Line 494 void read_cmo(FILE *s,Obj *rp) |
|
Line 496 void read_cmo(FILE *s,Obj *rp) |
|
BYTEARRAY array; |
BYTEARRAY array; |
LIST list; |
LIST list; |
|
|
read_int(s,&id); |
read_int(s,(unsigned int *)&id); |
switch ( id ) { |
switch ( id ) { |
/* level 0 objects */ |
/* level 0 objects */ |
case CMO_NULL: |
case CMO_NULL: |
Line 594 void read_cmo_uint(FILE *s,USINT *rp) |
|
Line 596 void read_cmo_uint(FILE *s,USINT *rp) |
|
{ |
{ |
unsigned int body; |
unsigned int body; |
|
|
read_int(s,&body); |
read_int(s,(unsigned int *)&body); |
MKUSINT(*rp,body); |
MKUSINT(*rp,body); |
} |
} |
|
|
Line 604 void read_cmo_zz(FILE *s,Z *rp) |
|
Line 606 void read_cmo_zz(FILE *s,Z *rp) |
|
int *b; |
int *b; |
mpz_t z; |
mpz_t z; |
|
|
read_int(s,&l); |
read_int(s,(unsigned int *)&l); |
if ( l == 0 ) { |
if ( l == 0 ) { |
*rp = 0; |
*rp = 0; |
return; |
return; |
Line 614 void read_cmo_zz(FILE *s,Z *rp) |
|
Line 616 void read_cmo_zz(FILE *s,Z *rp) |
|
} else |
} else |
sgn = 1; |
sgn = 1; |
b = (int *)MALLOC(l*sizeof(int)); |
b = (int *)MALLOC(l*sizeof(int)); |
read_intarray(s,b,l); |
read_intarray(s,(unsigned int *)b,l); |
mpz_init(z); |
mpz_init(z); |
mpz_import(z,l,-1,sizeof(int),0,0,b); |
mpz_import(z,l,-1,sizeof(int),0,0,b); |
if ( sgn < 0 ) mpz_neg(z,z); |
if ( sgn < 0 ) mpz_neg(z,z); |
Line 628 void read_cmo_bf(FILE *s,BF *bf) |
|
Line 630 void read_cmo_bf(FILE *s,BF *bf) |
|
unsigned int *ptr; |
unsigned int *ptr; |
|
|
NEWBF(r); |
NEWBF(r); |
read_int(s,&prec); |
read_int(s,(unsigned int *)&prec); |
read_int(s,&sgn); |
read_int(s,(unsigned int *)&sgn); |
read_int(s,&exp); |
read_int(s,(unsigned int *)&exp); |
read_int(s,&len); |
read_int(s,(unsigned int *)&len); |
mpfr_init2(r->body,prec); |
mpfr_init2(r->body,prec); |
MPFR_SIGN(r->body) = sgn; |
MPFR_SIGN(r->body) = sgn; |
MPFR_EXP(r->body) = exp; |
MPFR_EXP(r->body) = exp; |
Line 650 void read_cmo_list(FILE *s,Obj *rp) |
|
Line 652 void read_cmo_list(FILE *s,Obj *rp) |
|
NODE n0,n1; |
NODE n0,n1; |
LIST list; |
LIST list; |
|
|
read_int(s,&len); |
read_int(s,(unsigned int *)&len); |
w = (Obj *)ALLOCA(len*sizeof(Obj)); |
w = (Obj *)ALLOCA(len*sizeof(Obj)); |
for ( i = 0; i < len; i++ ) |
for ( i = 0; i < len; i++ ) |
read_cmo(s,&w[i]); |
read_cmo(s,&w[i]); |
Line 670 void read_cmo_dp(FILE *s,DP *rp) |
|
Line 672 void read_cmo_dp(FILE *s,DP *rp) |
|
DP dp; |
DP dp; |
Obj obj; |
Obj obj; |
|
|
read_int(s,&len); |
read_int(s,(unsigned int *)&len); |
/* skip the ring definition */ |
/* skip the ring definition */ |
read_cmo(s,&obj); |
read_cmo(s,&obj); |
for ( mp0 = 0, i = 0, d = 0; i < len; i++ ) { |
for ( mp0 = 0, i = 0, d = 0; i < len; i++ ) { |
Line 697 void read_cmo_monomial(FILE *s,DP *rp) |
|
Line 699 void read_cmo_monomial(FILE *s,DP *rp) |
|
int i,sugar,n; |
int i,sugar,n; |
DL dl; |
DL dl; |
|
|
read_int(s,&n); |
read_int(s,(unsigned int *)&n); |
NEWMP(m); NEWDL(dl,n); m->dl = dl; |
NEWMP(m); NEWDL(dl,n); m->dl = dl; |
read_intarray(s,dl->d,n); |
read_intarray(s,(unsigned int *)dl->d,n); |
for ( sugar = 0, i = 0; i < n; i++ ) |
for ( sugar = 0, i = 0; i < n; i++ ) |
sugar += dl->d[i]; |
sugar += dl->d[i]; |
dl->td = sugar; |
dl->td = sugar; |
Line 760 void read_cmo_upoly(FILE *s,P *rp) |
|
Line 762 void read_cmo_upoly(FILE *s,P *rp) |
|
Z q; |
Z q; |
DCP dc0,dc; |
DCP dc0,dc; |
|
|
read_int(s,&n); |
read_int(s,(unsigned int *)&n); |
read_int(s,&ind); |
read_int(s,(unsigned int *)&ind); |
for ( i = 0, dc0 = 0; i < n; i++ ) { |
for ( i = 0, dc0 = 0; i < n; i++ ) { |
read_int(s,&d); |
read_int(s,(unsigned int *)&d); |
read_cmo(s,&obj); c = (P)obj; |
read_cmo(s,&obj); c = (P)obj; |
if ( c ) { |
if ( c ) { |
if ( OID(c) == O_USINT ) { |
if ( OID(c) == O_USINT ) { |
|
|
pointer *ap; |
pointer *ap; |
Obj t; |
Obj t; |
|
|
read_int(s,&id); /* id = CMO_LIST */ |
read_int(s,(unsigned int *)&id); /* id = CMO_LIST */ |
read_int(s,&n); /* n = the number of args */ |
read_int(s,(unsigned int *)&n); /* n = the number of args */ |
*argp = ap = (pointer *) MALLOC(n*sizeof(pointer)); |
*argp = ap = (pointer *) MALLOC(n*sizeof(pointer)); |
for ( i = 0; i < n; i++ ) { |
for ( i = 0; i < n; i++ ) { |
read_cmo(s,&t); |
read_cmo(s,&t); |