mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
reverted patch depending on not yet commited work
This commit is contained in:
parent
690c85b406
commit
0170e42763
1 changed files with 4 additions and 16 deletions
|
@ -274,15 +274,6 @@ php_sprintf_appenddouble(char **buffer, int *pos,
|
|||
char *cvt;
|
||||
register int i = 0, j = 0;
|
||||
int sign, decpt;
|
||||
#ifdef HAVE_LOCALECONV
|
||||
char decimal_point;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
decimal_point = CG(decimal_point);
|
||||
#else
|
||||
#define decimal_point '.'
|
||||
#endif
|
||||
|
||||
|
||||
PRINTF_DEBUG(("sprintf: appenddouble(%x, %x, %x, %f, %d, '%c', %d, %c)\n",
|
||||
*buffer, pos, size, number, width, padding, alignment, fmt));
|
||||
|
@ -317,7 +308,7 @@ php_sprintf_appenddouble(char **buffer, int *pos,
|
|||
numbuf[i++] = '0';
|
||||
if (precision > 0) {
|
||||
int k = precision;
|
||||
numbuf[i++] = decimal_point;
|
||||
numbuf[i++] = '.';
|
||||
while ((decpt++ < 0) && k--) {
|
||||
numbuf[i++] = '0';
|
||||
}
|
||||
|
@ -326,12 +317,12 @@ php_sprintf_appenddouble(char **buffer, int *pos,
|
|||
while (decpt-- > 0)
|
||||
numbuf[i++] = cvt[j++];
|
||||
if (precision > 0)
|
||||
numbuf[i++] = decimal_point;
|
||||
numbuf[i++] = '.';
|
||||
}
|
||||
} else {
|
||||
numbuf[i++] = cvt[j++];
|
||||
if (precision > 0)
|
||||
numbuf[i++] = decimal_point;
|
||||
numbuf[i++] = '.';
|
||||
}
|
||||
|
||||
while (cvt[j]) {
|
||||
|
@ -345,9 +336,6 @@ php_sprintf_appenddouble(char **buffer, int *pos,
|
|||
}
|
||||
php_sprintf_appendstring(buffer, pos, size, numbuf, width, 0, padding,
|
||||
alignment, i, sign, 0);
|
||||
#ifndef HAVE_LOCALECONV
|
||||
#undef decimal_point
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -595,7 +583,7 @@ php_formatted_print(int ht, int *len, int use_array TSRMLS_DC)
|
|||
|
||||
case 'e':
|
||||
case 'f':
|
||||
/* XXX not done */ /* ??? WTF? 'g' missing or what? (hartmut) */
|
||||
/* XXX not done */
|
||||
convert_to_double_ex(args[argnum]);
|
||||
php_sprintf_appenddouble(&result, &outpos, &size,
|
||||
Z_DVAL_PP(args[argnum]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue