mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 16:54:51 +02:00
remove unused upper-case const strings in fmtfp
no float format that uses upper-case is supported nor are hex floats. ok dtucker
This commit is contained in:
parent
484c5e6168
commit
2138f6be59
@ -714,7 +714,9 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
int fplace = 0;
|
int fplace = 0;
|
||||||
int padlen = 0; /* amount to pad */
|
int padlen = 0; /* amount to pad */
|
||||||
int zpadlen = 0;
|
int zpadlen = 0;
|
||||||
|
#if 0
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
|
#endif
|
||||||
int idx;
|
int idx;
|
||||||
double intpart;
|
double intpart;
|
||||||
double fracpart;
|
double fracpart;
|
||||||
@ -776,8 +778,7 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
idx = (int) ((temp -intpart +0.05)* 10.0);
|
idx = (int) ((temp -intpart +0.05)* 10.0);
|
||||||
/* idx = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */
|
/* idx = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */
|
||||||
/* printf ("%llf, %f, %x\n", temp, intpart, idx); */
|
/* printf ("%llf, %f, %x\n", temp, intpart, idx); */
|
||||||
iconvert[iplace++] =
|
iconvert[iplace++] = "0123456789"[idx];
|
||||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[idx];
|
|
||||||
} while (intpart && (iplace < 311));
|
} while (intpart && (iplace < 311));
|
||||||
if (iplace == 311) iplace--;
|
if (iplace == 311) iplace--;
|
||||||
iconvert[iplace] = 0;
|
iconvert[iplace] = 0;
|
||||||
@ -791,8 +792,7 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
idx = (int) ((temp -fracpart +0.05)* 10.0);
|
idx = (int) ((temp -fracpart +0.05)* 10.0);
|
||||||
/* idx = (int) ((((temp/10) -fracpart) +0.05) *10); */
|
/* idx = (int) ((((temp/10) -fracpart) +0.05) *10); */
|
||||||
/* printf ("%lf, %lf, %ld\n", temp, fracpart, idx ); */
|
/* printf ("%lf, %lf, %ld\n", temp, fracpart, idx ); */
|
||||||
fconvert[fplace++] =
|
fconvert[fplace++] = "0123456789"[idx];
|
||||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[idx];
|
|
||||||
} while(fracpart && (fplace < 311));
|
} while(fracpart && (fplace < 311));
|
||||||
if (fplace == 311) fplace--;
|
if (fplace == 311) fplace--;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user