aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-10-28 22:06:27 +0000
committerMark Kettenis <kettenis@gnu.org>2001-10-28 22:06:27 +0000
commit87ffba60fb7234f505bd18800ca53a62fb7e3b0c (patch)
tree87ec49cac4a7361db865662086b2427dc05e4838 /gdb/doublest.h
parent4583280ca5c253f8d32b7c397ab10099c049073c (diff)
downloadgdb-87ffba60fb7234f505bd18800ca53a62fb7e3b0c.zip
gdb-87ffba60fb7234f505bd18800ca53a62fb7e3b0c.tar.gz
gdb-87ffba60fb7234f505bd18800ca53a62fb7e3b0c.tar.bz2
* doublest.c: Improve comments a bit.
(floatformat_from_length): New function. (NAN): Define to 0.0 if not already defined. (extract_floating): Rewrite to use floatformat_from_length. Warn instead of error if LEN doesn't match a known floating-point type, and return NaN (or 0.0 if NaN isn't available) in that case. (store_floating): Likewise, but zero out the target byte-stream if LEN doesn't match a known floating-point type. (extract_typed_floating): Reformat a bit. (store_typed_floating): Reformat a bit. Add comment about zeroing out padding in the target buffer. * doublest.h (extract_floating, store_floating): Fix comment about deprecation of these functions. Add parameter names to prototypes.
Diffstat (limited to 'gdb/doublest.h')
-rw-r--r--gdb/doublest.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/doublest.h b/gdb/doublest.h
index d3955b3..a31d849 100644
--- a/gdb/doublest.h
+++ b/gdb/doublest.h
@@ -61,9 +61,12 @@ extern int floatformat_is_negative (const struct floatformat *, char *);
extern int floatformat_is_nan (const struct floatformat *, char *);
extern char *floatformat_mantissa (const struct floatformat *, char *);
-/* Use extract_typed_float() and store_typed_float(). */
-extern DOUBLEST extract_floating (const void *in, int); /* DEPRECATED */
-extern void store_floating (void *, int, DOUBLEST); /* DEPRECATED */
+/* These two functions are deprecated in favour of
+ extract_typed_floating and store_typed_floating. See comments in
+ 'doublest.c' for details. */
+
+extern DOUBLEST extract_floating (const void *addr, int len);
+extern void store_floating (void *addr, int len, DOUBLEST val);
extern DOUBLEST extract_typed_floating (const void *addr,
const struct type *type);