diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-19 17:22:46 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-19 17:22:46 +0000 |
commit | b49a6fca58fa5e55ffa00fc6b722115b3c1a9750 (patch) | |
tree | ce82f02e4eb54838c267cacd21d04a2fd8b9ab56 /init2.c | |
parent | 847174a911cf9e6cd1f5e07f8ca489f5214bc8aa (diff) | |
download | mpfr-b49a6fca58fa5e55ffa00fc6b722115b3c1a9750.tar.gz |
mpfr_init and mpfr_init2 now return an int
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1902 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'init2.c')
-rw-r--r-- | init2.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -19,12 +19,13 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <stdio.h> #include "gmp.h" #include "gmp-impl.h" #include "mpfr.h" #include "mpfr-impl.h" -void +int mpfr_init2 (mpfr_ptr x, mp_prec_t p) { mp_size_t xsize; @@ -41,4 +42,6 @@ mpfr_init2 (mpfr_ptr x, mp_prec_t p) (*__gmp_allocate_func) ((size_t) xsize * BYTES_PER_MP_LIMB); MPFR_SIZE(x) = xsize; MPFR_SET_NAN(x); /* initializes to NaN */ + + return MPFR_MANT(x) == NULL; } |