2003-09-15 Andrew Cagney <cagney@redhat.com>
* floatformat.h (floatformat_to_double): Make input buffer constant.
(floatformat_from_double, floatformat_is_valid): Ditto.
Index: libiberty/ChangeLog
2003-09-15 Andrew Cagney <cagney@redhat.com>
* floatformat.c (get_field): Make "data" constant.
(floatformat_is_valid, floatformat_to_double): Make "from"
constant, fix casts.
(floatformat_from_double): Make "from" constant.
2003-09-15 Andrew Cagney <cagney@redhat.com>
2003-09-15 Andrew Cagney <cagney@redhat.com>
+ * floatformat.h (floatformat_to_double): Make input buffer constant.
+ (floatformat_from_double, floatformat_is_valid): Ditto.
+
+2003-09-15 Andrew Cagney <cagney@redhat.com>
+
* floatformat.h (struct floatformat): Make "exp_bias" signed.
2003-09-15 Daniel Jacobowitz <drow@mvista.com>
* floatformat.h (struct floatformat): Make "exp_bias" signed.
2003-09-15 Daniel Jacobowitz <drow@mvista.com>
Store the double in *TO. */
extern void
Store the double in *TO. */
extern void
-floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
+floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *));
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
floatformat_from_double PARAMS ((const struct floatformat *,
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
floatformat_from_double PARAMS ((const struct floatformat *,
+ const double *, char *));
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
extern int
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
extern int
-floatformat_is_valid PARAMS ((const struct floatformat *fmt, char *from));
+floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
#endif /* defined (FLOATFORMAT_H) */
#endif /* defined (FLOATFORMAT_H) */
+2003-09-15 Andrew Cagney <cagney@redhat.com>
+
+ * floatformat.c (get_field): Make "data" constant.
+ (floatformat_is_valid, floatformat_to_double): Make "from"
+ constant, fix casts.
+ (floatformat_from_double): Make "from" constant.
+
2003-09-15 Daniel Jacobowitz <drow@mvista.com>
* floatformat.c (floatformat_is_valid): New function.
2003-09-15 Daniel Jacobowitz <drow@mvista.com>
* floatformat.c (floatformat_is_valid): New function.
"floatformat_ia64_quad_little"
};
\f
"floatformat_ia64_quad_little"
};
\f
-static unsigned long get_field PARAMS ((unsigned char *,
+static unsigned long get_field PARAMS ((const unsigned char *,
enum floatformat_byteorders,
unsigned int,
unsigned int,
enum floatformat_byteorders,
unsigned int,
unsigned int,
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
get_field (data, order, total_len, start, len)
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
get_field (data, order, total_len, start, len)
+ const unsigned char *data;
enum floatformat_byteorders order;
unsigned int total_len;
unsigned int start;
enum floatformat_byteorders order;
unsigned int total_len;
unsigned int start;
void
floatformat_to_double (fmt, from, to)
const struct floatformat *fmt;
void
floatformat_to_double (fmt, from, to)
const struct floatformat *fmt;
- unsigned char *ufrom = (unsigned char *)from;
+ const unsigned char *ufrom = (const unsigned char *)from;
double dto;
long exponent;
unsigned long mant;
double dto;
long exponent;
unsigned long mant;
void
floatformat_from_double (fmt, from, to)
const struct floatformat *fmt;
void
floatformat_from_double (fmt, from, to)
const struct floatformat *fmt;
char *to;
{
double dfrom;
char *to;
{
double dfrom;
int
floatformat_is_valid (fmt, from)
const struct floatformat *fmt;
int
floatformat_is_valid (fmt, from)
const struct floatformat *fmt;
{
if (fmt == &floatformat_i387_ext)
{
{
if (fmt == &floatformat_i387_ext)
{
if the exponent is zero can it be zero, and then it must
be zero. */
unsigned long exponent, int_bit;
if the exponent is zero can it be zero, and then it must
be zero. */
unsigned long exponent, int_bit;
- unsigned char *ufrom = (unsigned char *) from;
+ const unsigned char *ufrom = (const unsigned char *) from;
exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
fmt->exp_start, fmt->exp_len);
exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
fmt->exp_start, fmt->exp_len);