projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix memory leak
[pspp]
/
src
/
libpspp
/
float-format.c
diff --git
a/src/libpspp/float-format.c
b/src/libpspp/float-format.c
index 7d65375ada731657a8ea50c221d843f8dacdb21e..79ba94469fc9fa085f2318d5f48d596f9c6b752f 100644
(file)
--- a/
src/libpspp/float-format.c
+++ b/
src/libpspp/float-format.c
@@
-106,6
+106,16
@@
float_convert (enum float_format from, const void *src,
}
}
}
}
+/* Converts SRC from format FROM to a native double and returns
+ the double. */
+double
+float_get_double (enum float_format from, const void *src)
+{
+ double dst;
+ float_convert (from, src, FLOAT_NATIVE_DOUBLE, &dst);
+ return dst;
+}
+
/* Returns the number of bytes in a number in the given
FORMAT. */
size_t
/* Returns the number of bytes in a number in the given
FORMAT. */
size_t