Commit c9b39473 by Benjamin Kosnik Committed by Benjamin Kosnik

locale_facets.h (_Format_cache): _S_ecks -> _S_x.


2000-06-02  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/locale_facets.h (_Format_cache): _S_ecks -> _S_x.
	* bits/locale_facets.tcc (num_get<char>::_M_extract): Fix for hex.

From-SVN: r34365
parent 2f8edb39
2000-06-02 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* bits/locale_facets.h (_Format_cache): _S_ecks -> _S_x.
* bits/locale_facets.tcc (num_get<char>::_M_extract): Fix for hex.
2000-06-02 Anthony Williams <anthony@anthonyw.cjb.net> 2000-06-02 Anthony Williams <anthony@anthonyw.cjb.net>
* testsuite/21_strings/replace.cc (test01): Qualify find with std::. * testsuite/21_strings/replace.cc (test01): Qualify find with std::.
......
...@@ -783,8 +783,8 @@ namespace std ...@@ -783,8 +783,8 @@ namespace std
{ {
_S_minus, _S_minus,
_S_plus, _S_plus,
_S_ecks, _S_x,
_S_Ecks, _S_X,
_S_digits, _S_digits,
_S_digits_end = _S_digits + 16, _S_digits_end = _S_digits + 16,
_S_udigits = _S_digits_end, _S_udigits = _S_digits_end,
......
...@@ -333,12 +333,14 @@ namespace std ...@@ -333,12 +333,14 @@ namespace std
{ {
if (__testEE) if (__testEE)
{ {
if (__testEEsign) break; if (__testEEsign)
break;
__testEEsign = true; __testEEsign = true;
} }
else else
{ {
if (__testsign) break; if (__testsign)
break;
__testsign = true; __testsign = true;
} }
} }
...@@ -346,17 +348,27 @@ namespace std ...@@ -346,17 +348,27 @@ namespace std
else if ((__p == &__lits[__cache_type::_S_ee]) else if ((__p == &__lits[__cache_type::_S_ee])
|| (__p == &__lits[__cache_type::_S_Ee])) || (__p == &__lits[__cache_type::_S_Ee]))
{ {
if (!__fp || __testEE || !__testsign) break; if (!__fp || __testEE || !__testsign)
break;
__testEE = true; __testEE = true;
} }
// Check for hexadecimal base parts.
else if ((__p == &__lits[__cache_type::_S_x])
|| (__p == &__lits[__cache_type::_S_X]))
{
if (__base != 16
&& __xtrc[__pos - 1] != __lits[__cache_type::_S_digits])
break;
}
// Check for appropriate digits. If found, too late for a sign // Check for appropriate digits. If found, too late for a sign
else if ((__p >= &__lits[__cache_type::_S_digits] else if ((__p >= &__lits[__cache_type::_S_digits]
&& __p < &__lits[__cache_type::_S_digits+__base]) && __p < &__lits[__cache_type::_S_digits + __base])
|| (__p >= &__lits[__cache_type::_S_udigits] || (__p >= &__lits[__cache_type::_S_udigits]
&& __p < &__lits[__cache_type::_S_udigits+__base])) && __p < &__lits[__cache_type::_S_udigits + __base]))
{ {
__testsign = true; __testsign = true;
if (__testEE) __testEEsign = true; if (__testEE)
__testEEsign = true;
} }
// Nothing else will do // Nothing else will do
else break; else break;
...@@ -1033,7 +1045,7 @@ namespace std ...@@ -1033,7 +1045,7 @@ namespace std
__sign_end = __front; __sign_end = __front;
if (__flags & ios_base::showbase) if (__flags & ios_base::showbase)
{ {
*--__front = __fmt->_S_literals[__fmt->_S_ecks + *--__front = __fmt->_S_literals[__fmt->_S_x +
((__flags & ios_base::uppercase) ? 1 : 0)]; ((__flags & ios_base::uppercase) ? 1 : 0)];
*--__front = __table[0]; *--__front = __table[0];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment