summaryrefslogtreecommitdiff
path: root/mpz/get_d.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2000-04-29 00:01:18 +0200
committerKevin Ryde <user42@zip.com.au>2000-04-29 00:01:18 +0200
commit831d8ca710b08d4fbbcbfd4284722bc539183b29 (patch)
tree2e66d4baf6db647331395704080778d7dc08b4f7 /mpz/get_d.c
parent00befba16c51a293dd94802e35f9f659070f2127 (diff)
downloadgmp-831d8ca710b08d4fbbcbfd4284722bc539183b29.tar.gz
Provide dual ANSI/K&R function definitions.
Diffstat (limited to 'mpz/get_d.c')
-rw-r--r--mpz/get_d.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/mpz/get_d.c b/mpz/get_d.c
index dc7495c4a..8f1fbb8fb 100644
--- a/mpz/get_d.c
+++ b/mpz/get_d.c
@@ -1,6 +1,6 @@
/* double mpz_get_d (mpz_t src) -- Return the double approximation to SRC.
-Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -23,7 +23,27 @@ MA 02111-1307, USA. */
#include "gmp-impl.h"
#include "longlong.h"
-static int mpn_zero_p ();
+
+static int
+#if __STDC__
+mpn_zero_p (mp_ptr p, mp_size_t n)
+#else
+mpn_zero_p (p, n)
+ mp_ptr p;
+ mp_size_t n;
+#endif
+{
+ mp_size_t i;
+
+ for (i = 0; i < n; i++)
+ {
+ if (p[i] != 0)
+ return 0;
+ }
+
+ return 1;
+}
+
double
#if __STDC__
@@ -106,19 +126,3 @@ mpz_get_d (src)
return negative ? -res : res;
}
-
-static int
-mpn_zero_p (p, n)
- mp_ptr p;
- mp_size_t n;
-{
- mp_size_t i;
-
- for (i = 0; i < n; i++)
- {
- if (p[i] != 0)
- return 0;
- }
-
- return 1;
-}