diff options
author | John Gilmore <gnu@cygnus> | 1992-02-20 19:23:42 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-02-20 19:23:42 +0000 |
commit | 088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b (patch) | |
tree | 0ce19e10e2ec6ba41392bf245df0841bfde317bc /gdb/ieee-float.c | |
parent | 8b87cbae28c26fd9b5bed99eb134f6c66ee946ac (diff) | |
download | gdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.zip gdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.tar.gz gdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.tar.bz2 |
* defs.h: Include ansidecl.h and PARAMS macro. Use PARAMS
to make prototypes for all functions declared here.
* cplus-dem.c: Avoid declaring xmalloc and xrealloc.
* c-exp.y: Rename SIGNED, OR, and AND to avoid conflict.
* environ.c: Include <stdio.h> before defs.h. Minor cleanup.
* ieee-float.h: Use PARAMS for prototypes; make some params const.
* ieee-float.c, valarith.c: Include <stdio.h>. Lint. b*=>mem*.
* m2-exp.y: Remove unused CONST; Rename OR and AND.
* utils.c: Avoid declaring malloc and realloc. Lint.
(request_quit): Accept signal-number parameter.
Diffstat (limited to 'gdb/ieee-float.c')
-rw-r--r-- | gdb/ieee-float.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/ieee-float.c b/gdb/ieee-float.c index 9ab3d48..417186b 100644 --- a/gdb/ieee-float.c +++ b/gdb/ieee-float.c @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <stdio.h> + #include "defs.h" #include "ieee-float.h" #include <math.h> /* ldexp */ @@ -27,7 +29,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; { @@ -35,8 +37,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 @@ -68,7 +70,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; { @@ -93,8 +95,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; @@ -118,8 +120,8 @@ 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); } |