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

Diff for /OpenXM_contrib2/asir2000/io/bsave.c between version 1.17 and 1.19

version 1.17, 2015/08/04 06:20:45 version 1.19, 2017/08/31 09:11:04
Line 44 
Line 44 
  * 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/asir2000/io/bsave.c,v 1.16 2009/03/16 16:43:03 ohara Exp $   * $OpenXM: OpenXM_contrib2/asir2000/io/bsave.c,v 1.18 2015/08/13 00:13:03 noro Exp $
 */  */
 /* saveXXX must not use GC_malloc(), GC_malloc_atomic(). */  /* saveXXX must not use GC_malloc(), GC_malloc_atomic(). */
   
Line 112  void savebf(FILE *s,BF p)
Line 112  void savebf(FILE *s,BF p)
 {  {
   unsigned int zero = 0;    unsigned int zero = 0;
   unsigned int prec;    unsigned int prec;
         L exp;    L exp;
   int sgn,len,t;    int sgn,len,t;
   
   prec = MPFR_PREC(p->body);    prec = MPFR_PREC(p->body);
   exp = MPFR_EXP(p->body);    exp = MPFR_EXP(p->body);
   sgn = MPFR_SIGN(p->body);    sgn = MPFR_SIGN(p->body);
         len = MPFR_LIMB_SIZE(p->body);    len = MPFR_LIMB_SIZE(p->body);
   
         write_int(s,&sgn);    write_int(s,&sgn);
         write_int(s,(int *)&prec);    write_int(s,(int *)&prec);
         write_int64(s,(UL *)&exp);    write_int64(s,(UL *)&exp);
   #if defined(VISUAL)
   #if !defined(_WIN64)
           write_int(s,&len);
           write_intarray(s,p->body->_mpfr_d,len);
   #else
           t = (prec+31)/32;
           write_int(s,&t);
           write_longarray(s,(long long *)p->body->_mpfr_d,t);
   #endif
   #else
 #if SIZEOF_LONG == 4  #if SIZEOF_LONG == 4
         write_int(s,&len);          write_int(s,&len);
         write_intarray(s,p->body->_mpfr_d,len);          write_intarray(s,p->body->_mpfr_d,len);
 #else /* SIZEOF_LONG == 8 */  #else /* SIZEOF_LONG == 8 */
         t = 2*len;          t = (prec+31)/32;
         write_int(s,&t);          write_int(s,&t);
         write_longarray(s,p->body->_mpfr_d,len);          write_longarray(s,p->body->_mpfr_d,t);
   #endif
 #endif  #endif
 }  }
   

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.19

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