aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/ldtoa.c
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-12-03 20:25:16 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2018-01-17 11:47:08 -0600
commit0bda30e1ffd23488aa4a9b73f228089463fbee1a (patch)
treeb0efb851be762c4d530cc259070005318702321d /newlib/libc/stdlib/ldtoa.c
parent6783860a2e4e4183c073f62e4bb938cea0e096c3 (diff)
downloadnewlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.zip
newlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.tar.gz
newlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.tar.bz2
ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/stdlib/ldtoa.c')
-rw-r--r--newlib/libc/stdlib/ldtoa.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c
index a44413c..10a7537 100644
--- a/newlib/libc/stdlib/ldtoa.c
+++ b/newlib/libc/stdlib/ldtoa.c
@@ -61,13 +61,13 @@ typedef struct
unsigned short equot[NI];
} LDPARMS;
-static void esub (_CONST short unsigned int *a, _CONST short unsigned int *b,
+static void esub (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp);
-static void emul (_CONST short unsigned int *a, _CONST short unsigned int *b,
+static void emul (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp);
-static void ediv (_CONST short unsigned int *a, _CONST short unsigned int *b,
+static void ediv (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp);
-static int ecmp (_CONST short unsigned int *a, _CONST short unsigned int *b);
+static int ecmp (const short unsigned int *a, const short unsigned int *b);
static int enormlz (short unsigned int *x);
static int eshift (short unsigned int *x, int sc);
static void eshup1 (register short unsigned int *x);
@@ -77,7 +77,7 @@ static void eshdn1 (register short unsigned int *x);
static void eshdn8 (register short unsigned int *x);
static void eshdn6 (register short unsigned int *x);
static void eneg (short unsigned int *x);
-static void emov (register _CONST short unsigned int *a,
+static void emov (register const short unsigned int *a,
register short unsigned int *b);
static void eclear (register short unsigned int *x);
static void einfin (register short unsigned int *x, register LDPARMS * ldp);
@@ -111,24 +111,24 @@ static void e113toe (short unsigned int *pe, short unsigned int *y,
#if NE == 10
/* 0.0 */
-static _CONST unsigned short ezero[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
+static const unsigned short ezero[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};
/* 1.0E0 */
-static _CONST unsigned short eone[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
+static const unsigned short eone[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x3fff,
};
#else
/* 0.0 */
-static _CONST unsigned short ezero[NE] = {
+static const unsigned short ezero[NE] = {
0, 0000000, 0000000, 0000000, 0000000, 0000000,
};
/* 1.0E0 */
-static _CONST unsigned short eone[NE] = {
+static const unsigned short eone[NE] = {
0, 0000000, 0000000, 0000000, 0100000, 0x3fff,
};
@@ -140,7 +140,7 @@ static _CONST unsigned short eone[NE] = {
* messages is bound to the error codes defined
* in mconf.h.
*/
-static _CONST char *_CONST ermsg[7] = {
+static const char *const ermsg[7] = {
"unknown", /* error code 0 */
"domain", /* error code 1 */
"singularity", /* et seq. */
@@ -432,17 +432,17 @@ static int edivm (short unsigned int *den, short unsigned int *num,
LDPARMS * ldp);
static int emulm (short unsigned int *a, short unsigned int *b,
LDPARMS * ldp);
-static int eisneg (_CONST short unsigned int *x);
-static int eisinf (_CONST short unsigned int *x);
-static void emovi (_CONST short unsigned int *a, short unsigned int *b);
+static int eisneg (const short unsigned int *x);
+static int eisinf (const short unsigned int *x);
+static void emovi (const short unsigned int *a, short unsigned int *b);
static void emovo (short unsigned int *a, short unsigned int *b,
LDPARMS * ldp);
static void emovz (register short unsigned int *a,
register short unsigned int *b);
static void ecleaz (register short unsigned int *xi);
-static void eadd1 (_CONST short unsigned int *a, _CONST short unsigned int *b,
+static void eadd1 (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, int subflg, LDPARMS * ldp);
-static int eisnan (_CONST short unsigned int *x);
+static int eisnan (const short unsigned int *x);
static int eiisnan (short unsigned int *x);
#ifdef DEC
@@ -473,7 +473,7 @@ eclear (register short unsigned int *x)
*/
static void
-emov (register _CONST short unsigned int *a, register short unsigned int *b)
+emov (register const short unsigned int *a, register short unsigned int *b)
{
register int i;
@@ -506,7 +506,7 @@ eneg (short unsigned int *x)
* else return zero.
*/
static int
-eisneg (_CONST short unsigned int *x)
+eisneg (const short unsigned int *x)
{
#ifdef NANS
@@ -524,7 +524,7 @@ eisneg (_CONST short unsigned int *x)
* else return zero.
*/
static int
-eisinf (_CONST short unsigned int *x)
+eisinf (const short unsigned int *x)
{
if ((x[NE - 1] & 0x7fff) == 0x7fff)
@@ -542,7 +542,7 @@ eisinf (_CONST short unsigned int *x)
/* Check if e-type number is not a number.
*/
static int
-eisnan (_CONST short unsigned int *x)
+eisnan (const short unsigned int *x)
{
#ifdef NANS
@@ -612,9 +612,9 @@ einfin (register short unsigned int *x, register LDPARMS * ldp)
* converting it to internal format.
*/
static void
-emovi (_CONST short unsigned int *a, short unsigned int *b)
+emovi (const short unsigned int *a, short unsigned int *b)
{
- register _CONST unsigned short *p;
+ register const unsigned short *p;
register unsigned short *q;
int i;
@@ -1421,7 +1421,7 @@ mdfin:
*/
static void
-esub (_CONST short unsigned int *a, _CONST short unsigned int *b,
+esub (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp)
{
@@ -1452,7 +1452,7 @@ esub (_CONST short unsigned int *a, _CONST short unsigned int *b,
static void
-eadd1 (_CONST short unsigned int *a, _CONST short unsigned int *b,
+eadd1 (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, int subflg, LDPARMS * ldp)
{
unsigned short ai[NI], bi[NI], ci[NI];
@@ -1563,7 +1563,7 @@ done:
; ediv( a, b, c, ldp ); c = b / a
*/
static void
-ediv (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ediv (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp)
{
unsigned short ai[NI], bi[NI];
@@ -1669,7 +1669,7 @@ dnzro2:
; emul( a, b, c, ldp ); c = b * a
*/
static void
-emul (_CONST short unsigned int *a, _CONST short unsigned int *b,
+emul (const short unsigned int *a, const short unsigned int *b,
short unsigned int *c, LDPARMS * ldp)
{
unsigned short ai[NI], bi[NI];
@@ -2415,7 +2415,7 @@ toe24 (short unsigned int *x, short unsigned int *y)
* -2 if either a or b is a NaN.
*/
static int
-ecmp (_CONST short unsigned int *a, _CONST short unsigned int *b)
+ecmp (const short unsigned int *a, const short unsigned int *b)
{
unsigned short ai[NI], bi[NI];
register unsigned short *p, *q;
@@ -2627,7 +2627,7 @@ normdn:
#define MAXP 4096
#if NE == 10
-static _CONST unsigned short etens[NTEN + 1][NE] = {
+static const unsigned short etens[NTEN + 1][NE] = {
{0x6576, 0x4a92, 0x804a, 0x153f,
0xc94c, 0x979a, 0x8a20, 0x5202, 0xc460, 0x7525,}, /* 10**4096 */
{0x6a32, 0xce52, 0x329a, 0x28ce,
@@ -2656,7 +2656,7 @@ static _CONST unsigned short etens[NTEN + 1][NE] = {
0x0000, 0x0000, 0x0000, 0x0000, 0xa000, 0x4002,}, /* 10**1 */
};
-static _CONST unsigned short emtens[NTEN + 1][NE] = {
+static const unsigned short emtens[NTEN + 1][NE] = {
{0x2030, 0xcffc, 0xa1c3, 0x8123,
0x2de3, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */
{0x8264, 0xd2cb, 0xf2ea, 0x12d4,
@@ -2685,7 +2685,7 @@ static _CONST unsigned short emtens[NTEN + 1][NE] = {
0xcccc, 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0x3ffb,}, /* 10**-1 */
};
#else
-static _CONST unsigned short etens[NTEN + 1][NE] = {
+static const unsigned short etens[NTEN + 1][NE] = {
{0xc94c, 0x979a, 0x8a20, 0x5202, 0xc460, 0x7525,}, /* 10**4096 */
{0xa74d, 0x5de4, 0xc53d, 0x3b5d, 0x9e8b, 0x5a92,}, /* 10**2048 */
{0x650d, 0x0c17, 0x8175, 0x7586, 0xc976, 0x4d48,},
@@ -2701,7 +2701,7 @@ static _CONST unsigned short etens[NTEN + 1][NE] = {
{0x0000, 0x0000, 0x0000, 0x0000, 0xa000, 0x4002,}, /* 10**1 */
};
-static _CONST unsigned short emtens[NTEN + 1][NE] = {
+static const unsigned short emtens[NTEN + 1][NE] = {
{0x2de4, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */
{0x4925, 0x2de4, 0x3436, 0x534f, 0xceae, 0x256b,}, /* 10**-2048 */
{0x87a6, 0xc0bd, 0xda57, 0x82a5, 0xa2a6, 0x32b5,},
@@ -2973,7 +2973,7 @@ etoasc (short unsigned int *x, char *string, int ndigits, int outformat,
{
long digit;
unsigned short y[NI], t[NI], u[NI], w[NI];
- _CONST unsigned short *p, *r, *ten;
+ const unsigned short *p, *r, *ten;
unsigned short sign;
int i, j, k, expon, rndsav, ndigs;
char *s, *ss;
@@ -3328,7 +3328,7 @@ asctoeg (char *ss, short unsigned int *y, int oprec, LDPARMS * ldp)
int k, trail, c, rndsav;
long lexp;
unsigned short nsign;
- _CONST unsigned short *p;
+ const unsigned short *p;
char *sp, *s, *lstr;
int lenldstr;
int mflag = 0;
@@ -3654,7 +3654,7 @@ aexit:
*
* efloor( x, y, ldp );
*/
-static _CONST unsigned short bmask[] = {
+static const unsigned short bmask[] = {
0xffff,
0xfffe,
0xfffc,
@@ -3756,47 +3756,47 @@ eiremain (short unsigned int *den, short unsigned int *num, LDPARMS * ldp)
*/
#ifdef MIEEE
#if !defined(__mips)
-static _CONST unsigned short nan113[8] = {
+static const unsigned short nan113[8] = {
0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
};
-static _CONST unsigned short nan64[6] = {
+static const unsigned short nan64[6] = {
0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
};
-static _CONST unsigned short nan53[4] = { 0x7fff, 0xffff, 0xffff, 0xffff };
-static _CONST unsigned short nan24[2] = { 0x7fff, 0xffff };
+static const unsigned short nan53[4] = { 0x7fff, 0xffff, 0xffff, 0xffff };
+static const unsigned short nan24[2] = { 0x7fff, 0xffff };
#elif defined(__mips_nan2008) /* __mips */
-static _CONST unsigned short nan113[8] = { 0x7fff, 0x8000, 0, 0, 0, 0, 0, 0 };
-static _CONST unsigned short nan64[6] = { 0x7fff, 0xc000, 0, 0, 0, 0 };
-static _CONST unsigned short nan53[4] = { 0x7ff8, 0, 0, 0 };
-static _CONST unsigned short nan24[2] = { 0x7fc0, 0 };
+static const unsigned short nan113[8] = { 0x7fff, 0x8000, 0, 0, 0, 0, 0, 0 };
+static const unsigned short nan64[6] = { 0x7fff, 0xc000, 0, 0, 0, 0 };
+static const unsigned short nan53[4] = { 0x7ff8, 0, 0, 0 };
+static const unsigned short nan24[2] = { 0x7fc0, 0 };
#else /* __mips && !__mips_nan2008 */
-static _CONST unsigned short nan113[8] = {
+static const unsigned short nan113[8] = {
0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
};
-static _CONST unsigned short nan64[6] = {
+static const unsigned short nan64[6] = {
0x7fff, 0xbfff, 0xffff, 0xffff, 0xffff, 0xffff
};
-static _CONST unsigned short nan53[4] = { 0x7ff7, 0xffff, 0xffff, 0xffff };
-static _CONST unsigned short nan24[2] = { 0x7fbf, 0xffff };
+static const unsigned short nan53[4] = { 0x7ff7, 0xffff, 0xffff, 0xffff };
+static const unsigned short nan24[2] = { 0x7fbf, 0xffff };
#endif /* __mips && !__mips_nan2008 */
#else /* !MIEEE */
#if !defined(__mips) || defined(__mips_nan2008)
-static _CONST unsigned short nan113[8] = { 0, 0, 0, 0, 0, 0, 0x8000, 0x7fff };
-static _CONST unsigned short nan64[6] = { 0, 0, 0, 0, 0xc000, 0x7fff };
-static _CONST unsigned short nan53[4] = { 0, 0, 0, 0x7ff8 };
-static _CONST unsigned short nan24[2] = { 0, 0x7fc0 };
+static const unsigned short nan113[8] = { 0, 0, 0, 0, 0, 0, 0x8000, 0x7fff };
+static const unsigned short nan64[6] = { 0, 0, 0, 0, 0xc000, 0x7fff };
+static const unsigned short nan53[4] = { 0, 0, 0, 0x7ff8 };
+static const unsigned short nan24[2] = { 0, 0x7fc0 };
#else /* __mips && !__mips_nan2008 */
-static _CONST unsigned short nan113[8] = {
+static const unsigned short nan113[8] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff
};
-static _CONST unsigned short nan64[6] = {
+static const unsigned short nan64[6] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xbfff, 0x7fff
};
-static _CONST unsigned short nan53[4] = { 0xffff, 0xffff, 0xffff, 0x7ff7 };
-static _CONST unsigned short nan24[2] = { 0xffff, 0x7fbf };
+static const unsigned short nan53[4] = { 0xffff, 0xffff, 0xffff, 0x7ff7 };
+static const unsigned short nan24[2] = { 0xffff, 0x7fbf };
#endif /* __mips && !__mips_nan2008 */
#endif /* !MIEEE */
@@ -3805,7 +3805,7 @@ static void
enan (short unsigned int *nan, int size)
{
int i, n;
- _CONST unsigned short *p;
+ const unsigned short *p;
switch (size)
{