+2004-08-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/deque.tcc: Trivial formatting fixes.
+
+ * include/bits/locale_facets.tcc (num_get<>::do_get(&bool)):
+ Remove unneded typedef.
+
+ * include/bits/locale_facets.tcc: Very minor tweaks.
+
+ * testsuite/22_locale/time_put/put/wchar_t/1.cc: Use proper
+ type for the fill argument.
+ * testsuite/22_locale/time_put/put/wchar_t/10.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.
+
2004-08-13 Paolo Carlini <pcarlini@suse.de>
* src/debug.cc (_Error_formatter::_M_print_string): Fix thinko,
namespace _GLIBCXX_STD
{
template <typename _Tp, typename _Alloc>
- deque<_Tp,_Alloc>&
- deque<_Tp,_Alloc>::
+ deque<_Tp, _Alloc>&
+ deque<_Tp, _Alloc>::
operator=(const deque& __x)
{
const size_type __len = size();
}
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
insert(iterator position, const value_type& __x)
{
}
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
erase(iterator __position)
{
}
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
erase(iterator __first, iterator __last)
{
else
{
// Parse bool values as alphanumeric.
- typedef char_traits<_CharT> __traits_type;
typedef typename numpunct<_CharT>::__cache_type __cache_type;
__use_cache<__cache_type> __uc;
const locale& __loc = __io._M_getloc();
__new[0] = __cs[0];
__new[1] = __cs[1];
}
- _CharT* __p;
- __p = std::__add_grouping(__new + __off, __sep, __grouping,
- __grouping_size, __cs + __off,
- __cs + __len);
+ _CharT* __p = std::__add_grouping(__new + __off, __sep, __grouping,
+ __grouping_size, __cs + __off,
+ __cs + __len);
__len = __p - __new;
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 282. What types does numpunct grouping refer to?
// Add grouping, if necessary.
- _CharT* __p2;
const int __declen = __p ? __p - __cs : __len;
- __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size,
- __cs, __cs + __declen);
+ _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
+ __grouping_size,
+ __cs, __cs + __declen);
// Tack on decimal part.
int __newlen = __p2 - __new;
return std::__write(__s, __res, char_traits<char_type>::length(__res));
}
-
// Generic version does nothing.
template<typename _CharT>
int
__len = __res + 1;
__c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __len));
- __res = _M_transform(__c, __p, __res + 1);
+ __res = _M_transform(__c, __p, __len);
}
__ret.append(__c, __res);
// put(iter_type s, ios_base& str, char_type fill, const tm* t,
// char format, char modifier = 0) const;
oss.str(empty);
- iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
+ iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result1 = oss.str();
VERIFY( result1 == L"Sun" );
oss.str(empty);
- iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
+ iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result21 = oss.str(); // "04/04/71"
oss.str(empty);
- iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
+ iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result22 = oss.str(); // "12:00:00"
oss.str(empty);
- iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
+ iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result31 = oss.str(); // "04/04/71"
oss.str(empty);
- iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
+ iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result32 = oss.str(); // "12:00:00"
}
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// 02 char format
res = x;
- iter_type ret2 = tp.put(res.begin(), oss, ' ', &time_sanity, 'A');
+ iter_type ret2 = tp.put(res.begin(), oss, L' ', &time_sanity, 'A');
wstring sanity2(res.begin(), ret2);
VERIFY( err == goodbit );
VERIFY( res == L"Tuesdayxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" );
oss.imbue(loc_de);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it02 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
+ iterator_type os_it02 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result2 = oss.str();
VERIFY( result2 == L"Son" || result2 == L"So" );
oss.str(empty); // "%d.%m.%Y"
- iterator_type os_it23 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
+ iterator_type os_it23 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result23 = oss.str(); // "04.04.1971"
oss.str(empty); // "%T"
- iterator_type os_it24 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
+ iterator_type os_it24 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result24 = oss.str(); // "12:00:00"
oss.str(empty);
- iterator_type os_it33 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
+ iterator_type os_it33 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result33 = oss.str(); // "04.04.1971"
oss.str(empty);
- iterator_type os_it34 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
+ iterator_type os_it34 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result34 = oss.str(); // "12:00:00"
}
oss.imbue(loc_hk);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
+ iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result3 = oss.str();
VERIFY( result3 == L"Sun" );
oss.str(empty); // "%A, %B %d, %Y"
- iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
+ iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result25 = oss.str(); // "Sunday, April 04, 1971"
oss.str(empty); // "%I:%M:%S %Z"
- iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
+ iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result26 = oss.str(); // "12:00:00 PST"
oss.str(empty);
- iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
+ iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result35 = oss.str(); // "Sunday, April 04, 1971"
oss.str(empty);
- iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
+ iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result36 = oss.str(); // "12:00:00 PST"
}
wostringstream oss;
oss.imbue(loc_fr);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
+ iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result4 = oss.str();
VERIFY( result4 == L"dim" );
oss.str(empty); // "%d.%m.%Y"
- iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
+ iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result27 = oss.str(); // "04.04.1971"
oss.str(empty); // "%T"
- iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
+ iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result28 = oss.str(); // "12:00:00"
oss.str(empty);
- iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
+ iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result37 = oss.str(); // "04.04.1971"
oss.str(empty);
- iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
+ iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result38 = oss.str(); // "12:00:00"
}
// 2
oss.str(empty);
- iterator_type os_it05 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it05 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date));
wstring result5 = oss.str();
VERIFY( result5 == L"Sunday, the second of April");
- iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date));
wstring result6 = oss.str();
VERIFY( result6 != result5 );
oss.imbue(loc_de);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it07 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it07 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date));
wstring result7 = oss.str();
VERIFY( result7 == L"Sonntag, the second of April");
- iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date));
wstring result8 = oss.str();
VERIFY( result8 != result7 );
oss.imbue(loc_hk);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it09 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it09 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date));
wstring result9 = oss.str();
VERIFY( result9 == L"Sunday, the second of April");
- iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date));
wstring result10 = oss.str();
VERIFY( result10 != result9 );
wostringstream oss;
oss.imbue(loc_fr);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
- iterator_type os_it11 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it11 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date, date + traits::length(date));
wstring result11 = oss.str();
VERIFY( result11 == L"dimanche, the second of avril");
- iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
date_ex, date_ex + traits::length(date));
wstring result12 = oss.str();
VERIFY( result12 != result11 );