=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2018/io/cio.c,v retrieving revision 1.1 retrieving revision 1.4 diff -u -p -r1.1 -r1.4 --- OpenXM_contrib2/asir2018/io/cio.c 2018/09/19 05:45:08 1.1 +++ OpenXM_contrib2/asir2018/io/cio.c 2020/02/22 06:23:36 1.4 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM$ + * $OpenXM: OpenXM_contrib2/asir2018/io/cio.c,v 1.3 2019/03/06 07:35:40 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -89,6 +89,7 @@ void write_cmo(FILE *s,Obj obj) int r; char errmsg[BUFSIZ]; LIST l; + QUOTE quote; if ( !obj ) { r = CMO_NULL; write_int(s,&r); @@ -147,7 +148,8 @@ void write_cmo(FILE *s,Obj obj) r = ((USINT)obj)->body; write_int(s,&r); break; case O_QUOTE: - fnodetotree(BDY((QUOTE)obj),&l); + quote = (QUOTE)obj; + fnodetotree(BDY(quote),quote->pvs,&l); write_cmo_tree(s,l); break; case O_MAT: @@ -232,7 +234,7 @@ void write_cmo_q(FILE *s,Q q) r = CMO_QQ; write_int(s,&r); nmq(q,&nm); write_cmo_zz(s,nm); - nmq(q,&dn); + dnq(q,&dn); write_cmo_zz(s,dn); } else { r = CMO_ZZ; write_int(s,&r); @@ -323,7 +325,7 @@ void write_cmo_upoly(FILE *s,VL vl,P p) for ( i = 0, vlt = vl; vlt->v != v; vlt = NEXT(vlt), i++ ); write_int(s,&i); for ( dct = dc; dct; dct = NEXT(dct) ) { - i = QTOS(DEG(dct)); write_int(s,&i); + i = ZTOS(DEG(dct)); write_int(s,&i); write_cmo_upoly(s,vl,COEF(dct)); } } @@ -767,10 +769,10 @@ void read_cmo_upoly(FILE *s,P *rp) read_cmo(s,&obj); c = (P)obj; if ( c ) { if ( OID(c) == O_USINT ) { - UTOQ(((USINT)c)->body,q); c = (P)q; + UTOZ(((USINT)c)->body,q); c = (P)q; } NEXTDC(dc0,dc); - STOQ(d,q); + STOZ(d,q); dc->c = c; dc->d = q; } }