=================================================================== RCS file: /home/cvs/OpenXM_contrib/gmp/mpq/Attic/init.c,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- OpenXM_contrib/gmp/mpq/Attic/init.c 2000/09/09 14:13:05 1.1.1.2 +++ OpenXM_contrib/gmp/mpq/Attic/init.c 2003/08/25 16:06:34 1.1.1.3 @@ -1,6 +1,6 @@ /* mpq_init -- Make a new rational number with value 0/1. -Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. +Copyright 1991, 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -23,18 +23,18 @@ MA 02111-1307, USA. */ #include "gmp-impl.h" void -#if __STDC__ mpq_init (MP_RAT *x) -#else -mpq_init (x) - MP_RAT *x; -#endif { x->_mp_num._mp_alloc = 1; - x->_mp_num._mp_d = (mp_ptr) (*_mp_allocate_func) (BYTES_PER_MP_LIMB); + x->_mp_num._mp_d = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); x->_mp_num._mp_size = 0; x->_mp_den._mp_alloc = 1; - x->_mp_den._mp_d = (mp_ptr) (*_mp_allocate_func) (BYTES_PER_MP_LIMB); + x->_mp_den._mp_d = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); x->_mp_den._mp_d[0] = 1; x->_mp_den._mp_size = 1; + +#ifdef __CHECKER__ + /* let the low limb look initialized, for the benefit of mpz_get_ui etc */ + x->_mp_num._mp_d[0] = 0; +#endif }