diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-02 19:41:42 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-02 19:41:42 +0000 |
commit | d0645b1794541317344171238ed3e1eca1b407fe (patch) | |
tree | 147b0204b4191b97998f3e2dfb5c2c092b18f3b8 /libstdc++-v3 | |
parent | 8847a4b1a6598d98ff678849802c4f0cddd27bbf (diff) | |
download | gcc-d0645b1794541317344171238ed3e1eca1b407fe.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/bits/locale_facets.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/bits/locale_facets.tcc | 32 |
3 files changed, 29 insertions, 12 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f12e1fc1c38..0595fddf706 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +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> * testsuite/21_strings/replace.cc (test01): Qualify find with std::. diff --git a/libstdc++-v3/bits/locale_facets.h b/libstdc++-v3/bits/locale_facets.h index 5de91e1ada5..3c1cca2bbc5 100644 --- a/libstdc++-v3/bits/locale_facets.h +++ b/libstdc++-v3/bits/locale_facets.h @@ -783,8 +783,8 @@ namespace std { _S_minus, _S_plus, - _S_ecks, - _S_Ecks, + _S_x, + _S_X, _S_digits, _S_digits_end = _S_digits + 16, _S_udigits = _S_digits_end, diff --git a/libstdc++-v3/bits/locale_facets.tcc b/libstdc++-v3/bits/locale_facets.tcc index 21774d9d7e7..34721b2ef0c 100644 --- a/libstdc++-v3/bits/locale_facets.tcc +++ b/libstdc++-v3/bits/locale_facets.tcc @@ -333,30 +333,42 @@ namespace std { if (__testEE) { - if (__testEEsign) break; + if (__testEEsign) + break; __testEEsign = true; } else { - if (__testsign) break; + if (__testsign) + break; __testsign = true; } } // Check for exponential part and accept if appropriate. - else if ((__p == &__lits[__cache_type::_S_ee]) - || (__p == &__lits[__cache_type::_S_Ee])) + else if ((__p == &__lits[__cache_type::_S_ee]) + || (__p == &__lits[__cache_type::_S_Ee])) + { + if (!__fp || __testEE || !__testsign) + break; + __testEE = true; + } + // Check for hexadecimal base parts. + else if ((__p == &__lits[__cache_type::_S_x]) + || (__p == &__lits[__cache_type::_S_X])) { - if (!__fp || __testEE || !__testsign) break; - __testEE = true; + if (__base != 16 + && __xtrc[__pos - 1] != __lits[__cache_type::_S_digits]) + break; } // Check for appropriate digits. If found, too late for a sign 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+__base])) + && __p < &__lits[__cache_type::_S_udigits + __base])) { __testsign = true; - if (__testEE) __testEEsign = true; + if (__testEE) + __testEEsign = true; } // Nothing else will do else break; @@ -1033,7 +1045,7 @@ namespace std __sign_end = __front; 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)]; *--__front = __table[0]; } |