summaryrefslogtreecommitdiff
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
commita8758214487b8f790087cdff5d6c8fcec112a8bd (patch)
tree138e1e621a7cf545a3193ae63e236cba9131f618 /gdb/doublest.h
parentca27d03581324945418e823efd525f0097db342d (diff)
downloadgdb-a8758214487b8f790087cdff5d6c8fcec112a8bd.tar.gz
* 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 d3955b37955..a31d8497fd1 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);