summaryrefslogtreecommitdiff
path: root/mpf
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2000-04-29 22:26:58 +0200
committerKevin Ryde <user42@zip.com.au>2000-04-29 22:26:58 +0200
commit2703a5377ac86f2c9393930e464f182421fc6f43 (patch)
tree66244b50ef35164a6a8097e6358b2096c1f4af1d /mpf
parentbadd510a43adf973a8a5e4e36a6e51cbfb918d8b (diff)
downloadgmp-2703a5377ac86f2c9393930e464f182421fc6f43.tar.gz
Use new *_SWAP macros.
Diffstat (limited to 'mpf')
-rw-r--r--mpf/get_str.c7
-rw-r--r--mpf/set_str.c5
-rw-r--r--mpf/sub.c6
3 files changed, 6 insertions, 12 deletions
diff --git a/mpf/get_str.c b/mpf/get_str.c
index 8edee55a2..09baaea7b 100644
--- a/mpf/get_str.c
+++ b/mpf/get_str.c
@@ -39,9 +39,6 @@ MA 02111-1307, USA. */
easily be interrupted when the needed number of digits are generated.
*/
-#define swapptr(xp,yp) \
-do { mp_ptr _swapptr_tmp = (xp); (xp) = (yp); (yp) = _swapptr_tmp; } while (0)
-
char *
#if __STDC__
mpf_get_str (char *digit_ptr, mp_exp_t *exp, int base, size_t n_digits, mpf_srcptr u)
@@ -168,7 +165,7 @@ mpf_get_str (digit_ptr, exp, base, n_digits, u)
rsize = prec;
}
else
- swapptr (rp, tp);
+ MP_PTR_SWAP (rp, tp);
if (((exp_in_base >> i) & 1) != 0)
{
@@ -273,7 +270,7 @@ mpf_get_str (digit_ptr, exp, base, n_digits, u)
rsize = prec;
}
else
- swapptr (rp, tp);
+ MP_PTR_SWAP (rp, tp);
if (((exp_in_base >> i) & 1) != 0)
{
diff --git a/mpf/set_str.c b/mpf/set_str.c
index 809831d9e..f5900044b 100644
--- a/mpf/set_str.c
+++ b/mpf/set_str.c
@@ -29,9 +29,6 @@ MA 02111-1307, USA. */
#include "longlong.h"
-#define swapptr(xp,yp) \
-do { mp_ptr _swapptr_tmp = (xp); (xp) = (yp); (yp) = _swapptr_tmp; } while (0)
-
long int strtol _PROTO ((const char *, char **ptr, int));
static int
@@ -242,7 +239,7 @@ mpf_set_str (x, str, base)
rsize = prec;
}
else
- swapptr (rp, tp);
+ MP_PTR_SWAP (rp, tp);
if (((exp_in_base >> i) & 1) != 0)
{
diff --git a/mpf/sub.c b/mpf/sub.c
index a9de18cb3..b6d1eb4f0 100644
--- a/mpf/sub.c
+++ b/mpf/sub.c
@@ -1,6 +1,7 @@
/* mpf_sub -- Subtract two floats.
-Copyright (C) 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000 Free Software Foundation,
+Inc.
This file is part of the GNU MP Library.
@@ -141,8 +142,7 @@ mpf_sub (r, u, v)
wouldn't have exited unless up[usize - 1] and vp[vsize - 1]
were non-equal, this if-statement catches all cases where U
is smaller than V. */
- { mp_srcptr tp = up; up = vp; vp = tp; }
- { mp_size_t tsize = usize; usize = vsize; vsize = tsize; }
+ MPN_SRCPTR_SWAP (up,usize, vp,vsize);
negate ^= 1;
/* negating ediff not necessary since it is 0. */
}