mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
2002-09-30 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex_internal.h (re_match_context_t): Add a new member. (re_fail_stack_ent_t): New structure. (re_fail_stack_t): Likewise. * posix/regexec.c (re_search_internal): Use the new member of re_match_context_t. Use fail stack only if it has back references and there are plural matching candidates. (proceed_next_node): Use fail stack if it is indicated. (set_regs): Likewise. (push_fail_stack): New function. (pop_fail_stack): New function. (check_dst_limits): Likewise. (check_dst_limits_calc_pos): Likewise. (search_subexp): Check the limitations on the top of subexpressions. (sift_states_bkref): Check the limitations of the destination node. Reuse the array sctx->sifted_states. 2002-09-30 Ulrich Drepper <drepper@redhat.com> * stdio-common/printf_fp.c: Shuffle a few lines around to help the compiler optimizing. No semantical changes intended.
This commit is contained in:
@@ -212,8 +212,7 @@ __printf_fp (FILE *fp,
|
||||
else if (scalesize == 0)
|
||||
{
|
||||
hi = frac[fracsize - 1];
|
||||
cy = __mpn_mul_1 (frac, frac, fracsize - 1, 10);
|
||||
frac[fracsize - 1] = cy;
|
||||
frac[fracsize - 1] = __mpn_mul_1 (frac, frac, fracsize - 1, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -237,9 +236,9 @@ __printf_fp (FILE *fp,
|
||||
}
|
||||
}
|
||||
|
||||
cy = __mpn_mul_1 (frac, frac, fracsize, 10);
|
||||
if (cy != 0)
|
||||
frac[fracsize++] = cy;
|
||||
mp_limb_t _cy = __mpn_mul_1 (frac, frac, fracsize, 10);
|
||||
if (_cy != 0)
|
||||
frac[fracsize++] = _cy;
|
||||
}
|
||||
|
||||
return L'0' + hi;
|
||||
@@ -364,6 +363,7 @@ __printf_fp (FILE *fp,
|
||||
/* Check for special values: not a number or infinity. */
|
||||
if (__isnan (fpnum.dbl))
|
||||
{
|
||||
is_neg = 0;
|
||||
if (isupper (info->spec))
|
||||
{
|
||||
special = "NAN";
|
||||
@@ -374,10 +374,10 @@ __printf_fp (FILE *fp,
|
||||
special = "nan";
|
||||
wspecial = L"nan";
|
||||
}
|
||||
is_neg = 0;
|
||||
}
|
||||
else if (__isinf (fpnum.dbl))
|
||||
{
|
||||
is_neg = fpnum.dbl < 0;
|
||||
if (isupper (info->spec))
|
||||
{
|
||||
special = "INF";
|
||||
@@ -388,7 +388,6 @@ __printf_fp (FILE *fp,
|
||||
special = "inf";
|
||||
wspecial = L"inf";
|
||||
}
|
||||
is_neg = fpnum.dbl < 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -814,6 +813,8 @@ __printf_fp (FILE *fp,
|
||||
{
|
||||
type = 'f';
|
||||
fracdig_min = fracdig_max = info->prec < 0 ? 6 : info->prec;
|
||||
dig_max = INT_MAX; /* Unlimited. */
|
||||
significant = 1; /* Does not matter here. */
|
||||
if (expsign == 0)
|
||||
{
|
||||
intdig_max = exponent + 1;
|
||||
@@ -825,8 +826,6 @@ __printf_fp (FILE *fp,
|
||||
intdig_max = 1;
|
||||
chars_needed = 1 + 1 + fracdig_max;
|
||||
}
|
||||
dig_max = INT_MAX; /* Unlimited. */
|
||||
significant = 1; /* Does not matter here. */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -912,7 +911,7 @@ __printf_fp (FILE *fp,
|
||||
{
|
||||
++fracdig_no;
|
||||
*wcp = hack_digit ();
|
||||
if (*wcp != L'0')
|
||||
if (*wcp++ != L'0')
|
||||
significant = 1;
|
||||
else if (significant == 0)
|
||||
{
|
||||
@@ -920,7 +919,6 @@ __printf_fp (FILE *fp,
|
||||
if (fracdig_min > 0)
|
||||
++fracdig_min;
|
||||
}
|
||||
++wcp;
|
||||
}
|
||||
|
||||
/* Do rounding. */
|
||||
|
Reference in New Issue
Block a user