summaryrefslogtreecommitdiff
path: root/init2.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-19 17:22:46 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-19 17:22:46 +0000
commitb49a6fca58fa5e55ffa00fc6b722115b3c1a9750 (patch)
treece82f02e4eb54838c267cacd21d04a2fd8b9ab56 /init2.c
parent847174a911cf9e6cd1f5e07f8ca489f5214bc8aa (diff)
downloadmpfr-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/init2.c b/init2.c
index 6b7df87b7..25291eedd 100644
--- a/init2.c
+++ b/init2.c
@@ -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;
}