aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-11-16 17:45:35 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-11-16 17:45:35 +0000
commitc68e412864eb454659168dae5d26cd6ac73d0e55 (patch)
tree59ed3b5c083d11cecc6c4148fffb2bdb8d9d95c5 /libstdc++-v3
parent06bcd7510e792c17a6a5354c612cf288b37a08c4 (diff)
downloadgcc-c68e412864eb454659168dae5d26cd6ac73d0e55.zip
gcc-c68e412864eb454659168dae5d26cd6ac73d0e55.tar.gz
gcc-c68e412864eb454659168dae5d26cd6ac73d0e55.tar.bz2
locale_facets.tcc (__verify_grouping): Move...
2007-11-16 Paolo Carlini <pcarlini@suse.de> * include/bits/locale_facets.tcc (__verify_grouping): Move... * src/locale_facets.cc: ... here. * config/abi/pre/gnu.ver: Update exports. From-SVN: r130233
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/config/abi/pre/gnu.ver2
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc26
-rw-r--r--libstdc++-v3/src/locale_facets.cc28
4 files changed, 35 insertions, 27 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7336b2b..147fbe6 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__verify_grouping): Move...
+ * src/locale_facets.cc: ... here.
+ * config/abi/pre/gnu.ver: Update exports.
+
2007-11-15 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (basic_istream<>::sentry::
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 87cc92e..0983e93 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -786,6 +786,8 @@ GLIBCXX_3.4.10 {
_ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE6stosscEv;
+ _ZSt17__verify_grouping*;
+
} GLIBCXX_3.4.9;
# Symbols in the support library (libsupc++) have their own tag.
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 000d6fb..12902f7 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -121,7 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 1,222,444 == __grouping_tmp of "\1\3\3"
// __grouping is parsed R to L
// 1,222,444 == __grouping of "\3" == "\3\3\3"
- static bool
+ bool
__verify_grouping(const char* __grouping, size_t __grouping_size,
const string& __grouping_tmp);
@@ -1237,30 +1237,6 @@ _GLIBCXX_END_LDBL_NAMESPACE
_Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod);
}
- bool
- __verify_grouping(const char* __grouping, size_t __grouping_size,
- const string& __grouping_tmp)
- {
- const size_t __n = __grouping_tmp.size() - 1;
- const size_t __min = std::min(__n, size_t(__grouping_size - 1));
- size_t __i = __n;
- bool __test = true;
-
- // Parsed number groupings have to match the
- // numpunct::grouping string exactly, starting at the
- // right-most point of the parsed sequence of elements ...
- for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
- __test = __grouping_tmp[__i] == __grouping[__j];
- for (; __i && __test; --__i)
- __test = __grouping_tmp[__i] == __grouping[__min];
- // ... but the first parsed grouping can be <= numpunct
- // grouping (only do the check if the numpunct char is > 0
- // because <= 0 means any size is ok).
- if (static_cast<signed char>(__grouping[__min]) > 0)
- __test &= __grouping_tmp[0] <= __grouping[__min];
- return __test;
- }
-
template<typename _CharT>
_CharT*
__add_grouping(_CharT* __s, _CharT __sep,
diff --git a/libstdc++-v3/src/locale_facets.cc b/libstdc++-v3/src/locale_facets.cc
index 46de583..8876f58 100644
--- a/libstdc++-v3/src/locale_facets.cc
+++ b/libstdc++-v3/src/locale_facets.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -90,5 +91,28 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__fptr = '\0';
}
-_GLIBCXX_END_NAMESPACE
+ bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp)
+ {
+ const size_t __n = __grouping_tmp.size() - 1;
+ const size_t __min = std::min(__n, size_t(__grouping_size - 1));
+ size_t __i = __n;
+ bool __test = true;
+
+ // Parsed number groupings have to match the
+ // numpunct::grouping string exactly, starting at the
+ // right-most point of the parsed sequence of elements ...
+ for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
+ __test = __grouping_tmp[__i] == __grouping[__j];
+ for (; __i && __test; --__i)
+ __test = __grouping_tmp[__i] == __grouping[__min];
+ // ... but the first parsed grouping can be <= numpunct
+ // grouping (only do the check if the numpunct char is > 0
+ // because <= 0 means any size is ok).
+ if (static_cast<signed char>(__grouping[__min]) > 0)
+ __test &= __grouping_tmp[0] <= __grouping[__min];
+ return __test;
+ }
+_GLIBCXX_END_NAMESPACE