From f2769d7e08b6ddbd4772fa1a65bb4a1cf04d5571 Mon Sep 17 00:00:00 2001 From: ghazi Date: Mon, 21 Aug 2006 12:34:25 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116296 138bc75d-0d04-0410-961f-82ee72b054a4 --- libdecnumber/ChangeLog | 13 +++++++++++++ libdecnumber/decContext.c | 2 +- libdecnumber/decContext.h | 2 +- libdecnumber/decNumber.c | 12 ++++++------ libdecnumber/decNumber.h | 2 +- libdecnumber/decimal128.c | 2 +- libdecnumber/decimal128.h | 2 +- libdecnumber/decimal32.c | 2 +- libdecnumber/decimal32.h | 2 +- libdecnumber/decimal64.c | 2 +- libdecnumber/decimal64.h | 2 +- 11 files changed, 28 insertions(+), 15 deletions(-) (limited to 'libdecnumber') diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index dc20db79e59..99096f813ee 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,16 @@ +2006-08-21 Kaveh R. Ghazi + + * 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 PR build/26188 diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c index 9cf96334c1f..8f5b683184e 100644 --- a/libdecnumber/decContext.c +++ b/libdecnumber/decContext.c @@ -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); diff --git a/libdecnumber/decContext.h b/libdecnumber/decContext.h index 537d319f184..d2e18db2c05 100644 --- a/libdecnumber/decContext.h +++ b/libdecnumber/decContext.h @@ -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 diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c index 3f5cc9f3a44..bd6b57b805c 100644 --- a/libdecnumber/decNumber.c +++ b/libdecnumber/decNumber.c @@ -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; /* .. */ diff --git a/libdecnumber/decNumber.h b/libdecnumber/decNumber.h index a4e81cd4053..797e781eaa4 100644 --- a/libdecnumber/decNumber.h +++ b/libdecnumber/decNumber.h @@ -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 *); diff --git a/libdecnumber/decimal128.c b/libdecnumber/decimal128.c index 07fcd9b08b7..b8794e7e251 100644 --- a/libdecnumber/decimal128.c +++ b/libdecnumber/decimal128.c @@ -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; /* .. */ diff --git a/libdecnumber/decimal128.h b/libdecnumber/decimal128.h index 5c697b9ad64..495b6e3022f 100644 --- a/libdecnumber/decimal128.h +++ b/libdecnumber/decimal128.h @@ -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 *); diff --git a/libdecnumber/decimal32.c b/libdecnumber/decimal32.c index a31a3b97274..88f79e9093e 100644 --- a/libdecnumber/decimal32.c +++ b/libdecnumber/decimal32.c @@ -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; /* .. */ diff --git a/libdecnumber/decimal32.h b/libdecnumber/decimal32.h index dd1c2c14b77..d00ae5b92d4 100644 --- a/libdecnumber/decimal32.h +++ b/libdecnumber/decimal32.h @@ -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 *); diff --git a/libdecnumber/decimal64.c b/libdecnumber/decimal64.c index ee166c786c8..5514d12cc53 100644 --- a/libdecnumber/decimal64.c +++ b/libdecnumber/decimal64.c @@ -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; /* .. */ diff --git a/libdecnumber/decimal64.h b/libdecnumber/decimal64.h index 55bb9494d6e..7416f549c07 100644 --- a/libdecnumber/decimal64.h +++ b/libdecnumber/decimal64.h @@ -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 *); -- cgit v1.2.1