mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-26 22:34:27 +08:00
decContext.c (decContextSetStatusFromString): Constify.
* decContext.c (decContextSetStatusFromString): Constify. * decContext.h (decContextSetStatusFromString): Likewise. * decNumber.c (decNumberFromString): Likewise. * decNumber.h (decNumberFromString): Likewise. * decimal128.c (decimal128FromString): Likewise. * decimal128.h (decimal128FromString): Likewise. * decimal32.c (decimal32FromString): Likewise. * decimal32.h (decimal32FromString): Likewise. * decimal64.c (decimal64FromString): Likewise. * decimal64.h (decimal64FromString): Likewise. From-SVN: r116296
This commit is contained in:
parent
08a557f682
commit
c5d4341770
@ -1,3 +1,16 @@
|
||||
2006-08-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* decContext.c (decContextSetStatusFromString): Constify.
|
||||
* decContext.h (decContextSetStatusFromString): Likewise.
|
||||
* decNumber.c (decNumberFromString): Likewise.
|
||||
* decNumber.h (decNumberFromString): Likewise.
|
||||
* decimal128.c (decimal128FromString): Likewise.
|
||||
* decimal128.h (decimal128FromString): Likewise.
|
||||
* decimal32.c (decimal32FromString): Likewise.
|
||||
* decimal32.h (decimal32FromString): Likewise.
|
||||
* decimal64.c (decimal64FromString): Likewise.
|
||||
* decimal64.h (decimal64FromString): Likewise.
|
||||
|
||||
2006-07-25 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
PR build/26188
|
||||
|
@ -162,7 +162,7 @@ decContextStatusToString (decContext * context)
|
||||
/* returned. */
|
||||
/* ------------------------------------------------------------------ */
|
||||
decContext *
|
||||
decContextSetStatusFromString (decContext * context, char *string)
|
||||
decContextSetStatusFromString (decContext * context, const char *string)
|
||||
{
|
||||
if (strcmp (string, DEC_Condition_CS) == 0)
|
||||
return decContextSetStatus (context, DEC_Conversion_syntax);
|
||||
|
@ -173,6 +173,6 @@ typedef struct
|
||||
decContext *decContextDefault (decContext *, int32_t);
|
||||
decContext *decContextSetStatus (decContext *, uint32_t);
|
||||
const char *decContextStatusToString (decContext *);
|
||||
decContext *decContextSetStatusFromString (decContext *, char *);
|
||||
decContext *decContextSetStatusFromString (decContext *, const char *);
|
||||
|
||||
#endif
|
||||
|
@ -339,7 +339,7 @@ decNumberToEngString (decNumber * dn, char *string)
|
||||
/* If bad syntax is detected, the result will be a quiet NaN. */
|
||||
/* ------------------------------------------------------------------ */
|
||||
decNumber *
|
||||
decNumberFromString (decNumber * dn, char chars[], decContext * set)
|
||||
decNumberFromString (decNumber * dn, const char chars[], decContext * set)
|
||||
{
|
||||
Int exponent = 0; /* working exponent [assume 0] */
|
||||
uByte bits = 0; /* working flags [assume +ve] */
|
||||
@ -348,11 +348,11 @@ decNumberFromString (decNumber * dn, char chars[], decContext * set)
|
||||
Unit *allocres = NULL; /* -> allocated result, iff allocated */
|
||||
Int need; /* units needed for result */
|
||||
Int d = 0; /* count of digits found in decimal part */
|
||||
char *dotchar = NULL; /* where dot was found */
|
||||
char *cfirst; /* -> first character of decimal part */
|
||||
char *last = NULL; /* -> last digit of decimal part */
|
||||
char *firstexp; /* -> first significant exponent digit */
|
||||
char *c; /* work */
|
||||
const char *dotchar = NULL; /* where dot was found */
|
||||
const char *cfirst; /* -> first character of decimal part */
|
||||
const char *last = NULL; /* -> last digit of decimal part */
|
||||
const char *firstexp; /* -> first significant exponent digit */
|
||||
const char *c; /* work */
|
||||
Unit *up; /* .. */
|
||||
#if DECDPUN>1
|
||||
Int i; /* .. */
|
||||
|
@ -129,7 +129,7 @@ typedef struct
|
||||
#endif
|
||||
|
||||
/* Conversions */
|
||||
decNumber *decNumberFromString (decNumber *, char *, decContext *);
|
||||
decNumber *decNumberFromString (decNumber *, const char *, decContext *);
|
||||
char *decNumberToString (decNumber *, char *);
|
||||
char *decNumberToEngString (decNumber *, char *);
|
||||
|
||||
|
@ -296,7 +296,7 @@ decimal128ToEngString (decimal128 * d128, char *string)
|
||||
/* If an error occurs, the result will be a valid decimal128 NaN. */
|
||||
/* ------------------------------------------------------------------ */
|
||||
decimal128 *
|
||||
decimal128FromString (decimal128 * result, char *string, decContext * set)
|
||||
decimal128FromString (decimal128 * result, const char *string, decContext * set)
|
||||
{
|
||||
decContext dc; /* work */
|
||||
decNumber dn; /* .. */
|
||||
|
@ -102,7 +102,7 @@ typedef struct
|
||||
#endif
|
||||
|
||||
/* String conversions */
|
||||
decimal128 *decimal128FromString (decimal128 *, char *, decContext *);
|
||||
decimal128 *decimal128FromString (decimal128 *, const char *, decContext *);
|
||||
char *decimal128ToString (decimal128 *, char *);
|
||||
char *decimal128ToEngString (decimal128 *, char *);
|
||||
|
||||
|
@ -288,7 +288,7 @@ decimal32ToEngString (decimal32 * d32, char *string)
|
||||
/* If an error occurs, the result will be a valid decimal32 NaN. */
|
||||
/* ------------------------------------------------------------------ */
|
||||
decimal32 *
|
||||
decimal32FromString (decimal32 * result, char *string, decContext * set)
|
||||
decimal32FromString (decimal32 * result, const char *string, decContext * set)
|
||||
{
|
||||
decContext dc; /* work */
|
||||
decNumber dn; /* .. */
|
||||
|
@ -92,7 +92,7 @@ typedef struct
|
||||
#endif
|
||||
|
||||
/* String conversions. */
|
||||
decimal32 *decimal32FromString (decimal32 *, char *, decContext *);
|
||||
decimal32 *decimal32FromString (decimal32 *, const char *, decContext *);
|
||||
char *decimal32ToString (decimal32 *, char *);
|
||||
char *decimal32ToEngString (decimal32 *, char *);
|
||||
|
||||
|
@ -287,7 +287,7 @@ decimal64ToEngString (decimal64 * d64, char *string)
|
||||
/* If an error occurs, the result will be a valid decimal64 NaN. */
|
||||
/* ------------------------------------------------------------------ */
|
||||
decimal64 *
|
||||
decimal64FromString (decimal64 * result, char *string, decContext * set)
|
||||
decimal64FromString (decimal64 * result, const char *string, decContext * set)
|
||||
{
|
||||
decContext dc; /* work */
|
||||
decNumber dn; /* .. */
|
||||
|
@ -96,7 +96,7 @@ typedef struct
|
||||
#endif
|
||||
|
||||
/* String conversions */
|
||||
decimal64 *decimal64FromString (decimal64 *, char *, decContext *);
|
||||
decimal64 *decimal64FromString (decimal64 *, const char *, decContext *);
|
||||
char *decimal64ToString (decimal64 *, char *);
|
||||
char *decimal64ToEngString (decimal64 *, char *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user