diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-16 01:51:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@gcc.gnu.org> | 2003-09-16 01:51:07 +0000 |
commit | c9fbef12bee8504ff48a45e3c67099af6772857d (patch) | |
tree | 5c6e1c9bbf676db99a510a4191f0ac8fbdd92f76 | |
parent | 602a82f3cfb0d903381a63497fbfa98cf74adeaa (diff) | |
download | gcc-c9fbef12bee8504ff48a45e3c67099af6772857d.zip gcc-c9fbef12bee8504ff48a45e3c67099af6772857d.tar.gz gcc-c9fbef12bee8504ff48a45e3c67099af6772857d.tar.bz2 |
Index: include/ChangeLog
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.
From-SVN: r71422
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/floatformat.h | 6 | ||||
-rw-r--r-- | libiberty/ChangeLog | 7 | ||||
-rw-r--r-- | libiberty/floatformat.c | 14 |
4 files changed, 22 insertions, 10 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 037dee5..7d72708 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,5 +1,10 @@ 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> diff --git a/include/floatformat.h b/include/floatformat.h index 1d08fd6..3d0fd7a 100644 --- a/include/floatformat.h +++ b/include/floatformat.h @@ -113,18 +113,18 @@ extern const struct floatformat floatformat_ia64_quad_little; 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 *, - double *, char *)); + const double *, char *)); /* 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) */ diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index a70872e..5c4175b 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c index b892dbe..ee87e27 100644 --- a/libiberty/floatformat.c +++ b/libiberty/floatformat.c @@ -143,7 +143,7 @@ const struct floatformat floatformat_ia64_quad_little = "floatformat_ia64_quad_little" }; -static unsigned long get_field PARAMS ((unsigned char *, +static unsigned long get_field PARAMS ((const unsigned char *, enum floatformat_byteorders, unsigned int, unsigned int, @@ -153,7 +153,7 @@ static unsigned long get_field PARAMS ((unsigned char *, TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */ static unsigned long get_field (data, order, total_len, start, len) - unsigned char *data; + const unsigned char *data; enum floatformat_byteorders order; unsigned int total_len; unsigned int start; @@ -207,10 +207,10 @@ get_field (data, order, total_len, start, len) void floatformat_to_double (fmt, from, to) const struct floatformat *fmt; - char *from; + const char *from; double *to; { - unsigned char *ufrom = (unsigned char *)from; + const unsigned char *ufrom = (const unsigned char *)from; double dto; long exponent; unsigned long mant; @@ -331,7 +331,7 @@ put_field (data, order, total_len, start, len, stuff_to_put) void floatformat_from_double (fmt, from, to) const struct floatformat *fmt; - double *from; + const double *from; char *to; { double dfrom; @@ -409,7 +409,7 @@ floatformat_from_double (fmt, from, to) int floatformat_is_valid (fmt, from) const struct floatformat *fmt; - char *from; + const char *from; { if (fmt == &floatformat_i387_ext) { @@ -419,7 +419,7 @@ floatformat_is_valid (fmt, from) 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); |