aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/old/convert_numeric.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/old/convert_numeric.h')
-rw-r--r--src/plugins/old/convert_numeric.h42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/plugins/old/convert_numeric.h b/src/plugins/old/convert_numeric.h
index cc425f5..f3adead 100644
--- a/src/plugins/old/convert_numeric.h
+++ b/src/plugins/old/convert_numeric.h
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software 18along with this program; if not, write to the Free Software
19Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20 20
21#if !defined (FLOATFORMAT_H) 21#if ! defined (FLOATFORMAT_H)
22#define FLOATFORMAT_H 1 22#define FLOATFORMAT_H 1
23 23
24/*#include "ansidecl.h"*/ 24/*#include "ansidecl.h"*/
@@ -31,7 +31,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
31 31
32/* What is the order of the bytes? */ 32/* What is the order of the bytes? */
33 33
34enum EXTRACTOR_floatformat_byteorders { 34enum EXTRACTOR_floatformat_byteorders
35{
35 /* Standard little endian byte order. 36 /* Standard little endian byte order.
36 EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */ 37 EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */
37 floatformat_little, 38 floatformat_little,
@@ -51,12 +52,13 @@ enum EXTRACTOR_floatformat_byteorders {
51 floatformat_vax 52 floatformat_vax
52}; 53};
53 54
54enum EXTRACTOR_floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no }; 55enum EXTRACTOR_floatformat_intbit { floatformat_intbit_yes,
56 floatformat_intbit_no };
55 57
56struct EXTRACTOR_floatformat 58struct EXTRACTOR_floatformat
57{ 59{
58 enum EXTRACTOR_floatformat_byteorders byteorder; 60 enum EXTRACTOR_floatformat_byteorders byteorder;
59 unsigned int totalsize; /* Total size of number in bits */ 61 unsigned int totalsize; /* Total size of number in bits */
60 62
61 /* Sign bit is always one bit long. 1 means negative, 0 means positive. */ 63 /* Sign bit is always one bit long. 1 means negative, 0 means positive. */
62 unsigned int sign_start; 64 unsigned int sign_start;
@@ -90,13 +92,16 @@ struct EXTRACTOR_floatformat
90/* floatformats for IEEE single and double, big and little endian. */ 92/* floatformats for IEEE single and double, big and little endian. */
91 93
92extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_single_big; 94extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_single_big;
93extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_single_little; 95extern const struct EXTRACTOR_floatformat
96 EXTRACTOR_floatformat_ieee_single_little;
94extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_double_big; 97extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_double_big;
95extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_double_little; 98extern const struct EXTRACTOR_floatformat
99 EXTRACTOR_floatformat_ieee_double_little;
96 100
97/* floatformat for ARM IEEE double, little endian bytes and big endian words */ 101/* floatformat for ARM IEEE double, little endian bytes and big endian words */
98 102
99extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ieee_double_littlebyte_bigword; 103extern const struct EXTRACTOR_floatformat
104 EXTRACTOR_floatformat_ieee_double_littlebyte_bigword;
100 105
101/* floatformats for VAX. */ 106/* floatformats for VAX. */
102 107
@@ -110,31 +115,38 @@ extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_i387_ext;
110extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_m68881_ext; 115extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_m68881_ext;
111extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_i960_ext; 116extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_i960_ext;
112extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_m88110_ext; 117extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_m88110_ext;
113extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_m88110_harris_ext; 118extern const struct EXTRACTOR_floatformat
119 EXTRACTOR_floatformat_m88110_harris_ext;
114extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_arm_ext_big; 120extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_arm_ext_big;
115extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_arm_ext_littlebyte_bigword; 121extern const struct EXTRACTOR_floatformat
122 EXTRACTOR_floatformat_arm_ext_littlebyte_bigword;
116/* IA-64 Floating Point register spilt into memory. */ 123/* IA-64 Floating Point register spilt into memory. */
117extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_spill_big; 124extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_spill_big;
118extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_spill_little; 125extern const struct EXTRACTOR_floatformat
126 EXTRACTOR_floatformat_ia64_spill_little;
119extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_quad_big; 127extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_quad_big;
120extern const struct EXTRACTOR_floatformat EXTRACTOR_floatformat_ia64_quad_little; 128extern const struct EXTRACTOR_floatformat
129 EXTRACTOR_floatformat_ia64_quad_little;
121 130
122/* Convert from FMT to a double. 131/* Convert from FMT to a double.
123 FROM is the address of the extended float. 132 FROM is the address of the extended float.
124 Store the double in *TO. */ 133 Store the double in *TO. */
125 134
126extern void 135extern void
127EXTRACTOR_common_floatformat_to_double (const struct EXTRACTOR_floatformat *, const void *, double *); 136EXTRACTOR_common_floatformat_to_double (const struct EXTRACTOR_floatformat *,
137 const void *, double *);
128 138
129/* The converse: convert the double *FROM to FMT 139/* The converse: convert the double *FROM to FMT
130 and store where TO points. */ 140 and store where TO points. */
131 141
132extern void 142extern void
133EXTRACTOR_common_floatformat_from_double (const struct EXTRACTOR_floatformat *, const double *, void *); 143EXTRACTOR_common_floatformat_from_double (const struct EXTRACTOR_floatformat *,
144 const double *, void *);
134 145
135/* Return non-zero iff the data at FROM is a valid number in format FMT. */ 146/* Return non-zero iff the data at FROM is a valid number in format FMT. */
136 147
137extern int 148extern int
138EXTRACTOR_common_floatformat_is_valid (const struct EXTRACTOR_floatformat *fmt, const void *from); 149EXTRACTOR_common_floatformat_is_valid (const struct EXTRACTOR_floatformat *fmt,
150 const void *from);
139 151
140#endif /* defined (FLOATFORMAT_H) */ 152#endif /* defined (FLOATFORMAT_H) */