* utils.c (query): Remove test for energize from top. Now
[deliverable/binutils-gdb.git] / gdb / ieee-float.c
index 69a60f2e4c807606d5500961eab3ec85bea3a602..1764368fc559db61576a7bf8c2582916f878d01c 100644 (file)
@@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
-#include "param.h"
 #include "ieee-float.h"
 #include <math.h>              /* ldexp */
 
@@ -28,7 +27,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 void
 ieee_extended_to_double (ext_format, from, to)
-     struct ext_format *ext_format;
+     const struct ext_format *ext_format;
      char *from;
      double *to;
 {
@@ -36,8 +35,8 @@ ieee_extended_to_double (ext_format, from, to)
   double dto;
   unsigned long mant0, mant1, exponent;
   
-  bcopy (&from[MANBYTE_H], &mant0, 4);
-  bcopy (&from[MANBYTE_L], &mant1, 4);
+  memcpy (&mant0, &from[MANBYTE_H], 4);
+  memcpy (&mant1, &from[MANBYTE_L], 4);
   exponent = ((ufrom[EXPBYTE_H] & (unsigned char)~SIGNMASK) << 8) | ufrom[EXPBYTE_L];
 
 #if 0
@@ -69,7 +68,7 @@ ieee_extended_to_double (ext_format, from, to)
 
 void
 double_to_ieee_extended (ext_format, from, to)
-     struct ext_format *ext_format;
+     const struct ext_format *ext_format;
      double *from;
      char *to;
 {
@@ -78,7 +77,7 @@ double_to_ieee_extended (ext_format, from, to)
   unsigned long mant0, mant1, exponent;
   unsigned char tobytes[8];
 
-  bzero (to, TOTALSIZE);
+  memset (to, 0, TOTALSIZE);
   if (dfrom == 0)
     return;                    /* Result is zero */
   if (dfrom != dfrom) {
@@ -94,8 +93,8 @@ double_to_ieee_extended (ext_format, from, to)
 
   /* The following code assumes that the host has IEEE doubles.  FIXME-someday.
      It also assumes longs are 32 bits!  FIXME-someday.  */
-  bcopy (from, twolongs, 8);
-  bcopy (from, tobytes, 8);
+  memcpy (twolongs, from, 8);
+  memcpy (tobytes, from, 8);
 #if HOST_BYTE_ORDER == BIG_ENDIAN
   exponent = ((tobytes[1] & 0xF0) >> 4) | (tobytes[0] & 0x7F) << 4;
   mant0 = (twolongs[0] << 11) | twolongs[1] >> 21;
@@ -119,12 +118,12 @@ double_to_ieee_extended (ext_format, from, to)
   to[EXPBYTE_H] |= (unsigned char)(exponent >> 8);     /* Retain sign */
   to[EXPBYTE_L] =  (unsigned char) exponent;
   
-  bcopy (&mant0, &to[MANBYTE_H], 4);
-  bcopy (&mant1, &to[MANBYTE_L], 4);
+  memcpy (&to[MANBYTE_H], &mant0, 4);
+  memcpy (&to[MANBYTE_L], &mant1, 4);
 }
 
 
-#ifdef DEBUG
+#ifdef IEEE_DEBUG
 
 /* Test some numbers to see that extended/double conversion works for them.  */
 
This page took 0.024749 seconds and 4 git commands to generate.