summaryrefslogtreecommitdiff
path: root/print_raw.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 09:39:11 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 09:39:11 +0000
commit4e239fba0fa5d9dd985163df3d39b7014ca77775 (patch)
tree170dc2a619949a52770d02085fdf1b62ee3c5875 /print_raw.c
parentef4a25753364fe21a6cc89b698ee6073ad8b29a3 (diff)
downloadmpfr-4e239fba0fa5d9dd985163df3d39b7014ca77775.tar.gz
1 -> BITS_PER_MP_LIMB
translated french comments to english added static to local functions git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1497 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'print_raw.c')
-rw-r--r--print_raw.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/print_raw.c b/print_raw.c
index 3b75e8eb3..7b0c4c791 100644
--- a/print_raw.c
+++ b/print_raw.c
@@ -1,7 +1,7 @@
/* mpfr_print_raw -- print the internal binary representation of a
floating-point number
-Copyright (C) 1999 Free Software Foundation.
+Copyright (C) 1999-2001 Free Software Foundation.
This file is part of the MPFR Library.
@@ -26,16 +26,10 @@ MA 02111-1307, USA. */
#include "mpfr.h"
#include "mpfr-impl.h"
-void mpfr_get_str_raw _PROTO ((char *, mpfr_srcptr));
+static void mpfr_get_str_raw _PROTO ((char *, mpfr_srcptr));
-void
-#if __STDC__
+static void
mpfr_get_str_raw (char *digit_ptr, mpfr_srcptr x)
-#else
-mpfr_get_str_raw (digit_ptr, x)
- char *digit_ptr;
- mpfr_srcptr x;
-#endif
{
mp_limb_t *mx, wd, t; long ex, sx, k, l, p;
@@ -43,8 +37,6 @@ mpfr_get_str_raw (digit_ptr, x)
ex = MPFR_EXP(x);
p = MPFR_PREC(x);
- /* TODO: utilite de gerer l'infini a ce niveau ? */
-
if (MPFR_SIGN(x) < 0) { *digit_ptr = '-'; digit_ptr++; }
sprintf(digit_ptr, "0."); digit_ptr += 2;
@@ -52,7 +44,7 @@ mpfr_get_str_raw (digit_ptr, x)
for (k = sx - 1; k >= 0 ; k--)
{
wd = mx[k];
- t = ((mp_limb_t)1) << (BITS_PER_MP_LIMB - 1);
+ t = MP_LIMB_T_ONE << (BITS_PER_MP_LIMB - 1);
for (l = BITS_PER_MP_LIMB - 1; l>=0; l--)
{
if (wd & t)