Update of /cvsroot/adobe-source/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe Modified Files: Jamfile.v2 adam.hpp adam_evaluate.hpp adam_parser.hpp algorithm.hpp array.hpp array_fwd.hpp circular_queue.hpp cmath.hpp config.hpp conversion.hpp copy_on_write.hpp counter.hpp dancing_links.hpp dictionary.hpp dictionary_fwd.hpp empty.hpp eve.hpp eve_evaluate.hpp eve_parser.hpp extents.hpp final.hpp forest.hpp functional.hpp istream.hpp istream_fwd.hpp iterator.hpp md5.hpp mismatch.hpp name.hpp name_fwd.hpp numeric.hpp once.hpp regular_object.hpp sha.hpp static_table.hpp string.hpp table_index.hpp thread_id.hpp typeinfo.hpp unicode.hpp value.hpp value_fwd.hpp virtual_machine.hpp xstring.hpp zuid.hpp Added Files: basic_sheet.hpp Log Message: asl 1.0.13 Index: copy_on_write.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/copy_on_write.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** copy_on_write.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- copy_on_write.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 32,88 **** { public: ! typedef T value_type; ! ! explicit copy_on_write(const value_type& x = value_type()) : ! object_m(new implementation_t(x)) ! { } ! copy_on_write(const copy_on_write& x) : ! object_m(x.object_m) ! { ! object_m->ref_count_m.increment(); ! } ! ~copy_on_write() ! { ! if (object_m->ref_count_m.decrement()) delete object_m; ! } ! copy_on_write& operator = (const copy_on_write& x) ! { ! x.object_m->ref_count_m.increment(); ! if (object_m->ref_count_m.decrement()) delete object_m; ! object_m = x.object_m; ! return *this; ! } ! value_type& write() ! { ! if (!object_m->ref_count_m.is_one()) ! { ! implementation_t* temp = new implementation_t(object_m->value_m); ! object_m->ref_count_m.decrement(); ! object_m = temp; ! } ! return object_m->value_m; ! } ! ! operator const value_type& () const ! { return object_m->value_m; } ! const value_type& operator*() const { return object_m->value_m; } ! const value_type* operator->() const { return &object_m->value_m; } ! bool unique_instance() const { return object_m->ref_count_m.is_one(); } ! bool identity(const copy_on_write<T>& x) const { return object_m == x.object_m; } ! private: ! friend inline void swap(copy_on_write& x, copy_on_write& y) ! { adobe::adl_swap(x.object_m, y.object_m); } #if !defined(ADOBE_NO_DOCUMENTATION) ! struct implementation_t; ! implementation_t* object_m; #endif }; --- 32,88 ---- { public: ! typedef T value_type; ! ! explicit copy_on_write(const value_type& x = value_type()) : ! object_m(new implementation_t(x)) ! { } ! copy_on_write(const copy_on_write& x) : ! object_m(x.object_m) ! { ! object_m->ref_count_m.increment(); ! } ! ~copy_on_write() ! { ! if (object_m->ref_count_m.decrement()) delete object_m; ! } ! copy_on_write& operator = (const copy_on_write& x) ! { ! x.object_m->ref_count_m.increment(); ! if (object_m->ref_count_m.decrement()) delete object_m; ! object_m = x.object_m; ! return *this; ! } ! value_type& write() ! { ! if (!object_m->ref_count_m.is_one()) ! { ! implementation_t* temp = new implementation_t(object_m->value_m); ! object_m->ref_count_m.decrement(); ! object_m = temp; ! } ! return object_m->value_m; ! } ! ! operator const value_type& () const ! { return object_m->value_m; } ! const value_type& operator*() const { return object_m->value_m; } ! const value_type* operator->() const { return &object_m->value_m; } ! bool unique_instance() const { return object_m->ref_count_m.is_one(); } ! bool identity(const copy_on_write<T>& x) const { return object_m == x.object_m; } ! private: ! friend inline void swap(copy_on_write& x, copy_on_write& y) ! { adobe::adl_swap(x.object_m, y.object_m); } #if !defined(ADOBE_NO_DOCUMENTATION) ! struct implementation_t; ! implementation_t* object_m; #endif }; *************** *** 93,101 **** /* ! NOTE (sparent) : We cannot use boost::totaly_ordered to implement these operations portably ! (although it works with most compilers, it doesn't with CW 9.6). The problem is that ! we do not know if T satifies the requirments for totally ordered or not - copy_on_write is ! only totally ordered if T is. By splitting the operations out to seperate template functions ! they are only instantiated if and where they are used. */ --- 93,101 ---- /* ! NOTE (sparent) : We cannot use boost::totaly_ordered to implement these operations portably ! (although it works with most compilers, it doesn't with CW 9.6). The problem is that ! we do not know if T satifies the requirments for totally ordered or not - copy_on_write is ! only totally ordered if T is. By splitting the operations out to seperate template functions ! they are only instantiated if and where they are used. */ *************** *** 129,136 **** struct copy_on_write<T>::implementation_t : private boost::noncopyable { ! implementation_t(const value_type& x) : value_m(x) { } ! value_type value_m; ! adobe::counter_t ref_count_m; }; --- 129,136 ---- struct copy_on_write<T>::implementation_t : private boost::noncopyable { ! implementation_t(const value_type& x) : value_m(x) { } ! value_type value_m; ! adobe::counter_t ref_count_m; }; Index: thread_id.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/thread_id.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thread_id.hpp 6 Jan 2006 18:35:02 -0000 1.3 --- thread_id.hpp 3 Feb 2006 18:20:41 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ Index: dictionary.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/dictionary.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dictionary.hpp 6 Jan 2006 18:35:02 -0000 1.5 --- dictionary.hpp 3 Feb 2006 18:20:41 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 32,57 **** namespace adobe { ! /*************************************************************************************************/ class dictionary_t::write_reference ! { ! public: ! value_t& operator[] (name_t key); ! protected: ! friend class dictionary_t; ! ! write_reference(dictionary_t& x) : ! fDictionary(x) ! { } ! private: ! dictionary_t& fDictionary; ! }; /*************************************************************************************************/ ! inline dictionary_t::write_reference dictionary_t::write() ! { return write_reference(*this); } ! /*************************************************************************************************/ --- 32,57 ---- namespace adobe { ! /*************************************************************************************************/ class dictionary_t::write_reference ! { ! public: ! value_t& operator[] (name_t key); ! protected: ! friend class dictionary_t; ! ! write_reference(dictionary_t& x) : ! fDictionary(x) ! { } ! private: ! dictionary_t& fDictionary; ! }; /*************************************************************************************************/ ! inline dictionary_t::write_reference dictionary_t::write() ! { return write_reference(*this); } ! /*************************************************************************************************/ *************** *** 61,66 **** template <class T> dictionary_t& dictionary_set(dictionary_t& object, name_t key, const T& x) ! { return dictionary_set(object, key, value_t(x)); } ! /*************************************************************************************************/ --- 61,66 ---- template <class T> dictionary_t& dictionary_set(dictionary_t& object, name_t key, const T& x) ! { return dictionary_set(object, key, value_t(x)); } ! /*************************************************************************************************/ *************** *** 68,74 **** struct dictionary_get<value_t> { ! const promote<value_t>::type& operator () (const dictionary_t& object, name_t key, select<value_t>); ! void operator () (const dictionary_t& object, name_t key, value_t& value); }; --- 68,74 ---- struct dictionary_get<value_t> { ! const promote<value_t>::type& operator () (const dictionary_t& object, name_t key, select<value_t>); ! void operator () (const dictionary_t& object, name_t key, value_t& value); }; *************** *** 76,91 **** struct dictionary_get { ! const typename promote<T>::type& operator () (const dictionary_t& object, name_t key, select<T>) ! { ! return dictionary_get<value_t>()(object, key, select<value_t>()).template get<T>(); ! } ! void operator () (const dictionary_t& object, name_t key, T& value) ! { ! value_t result; ! dictionary_get<value_t>()(object, key, result); ! result.get(value); ! } }; --- 76,91 ---- struct dictionary_get { ! const typename promote<T>::type& operator () (const dictionary_t& object, name_t key, select<T>) ! { ! return dictionary_get<value_t>()(object, key, select<value_t>()).template get<T>(); ! } ! void operator () (const dictionary_t& object, name_t key, T& value) ! { ! value_t result; ! dictionary_get<value_t>()(object, key, result); ! result.get(value); ! } }; *************** *** 94,188 **** template <typename T> inline const typename promote<T>::type& dictionary_t::get(name_t key) const ! { return dictionary_get<T>()(*this, key, select<T>()); } ! template <typename T> inline void dictionary_t::get(name_t key, T& value) const ! { dictionary_get<T>()(*this, key, value); } ! /*************************************************************************************************/ template <class InputIterator> dictionary_t dictionary_ctor(InputIterator first, InputIterator last) ! { ! dictionary_t result; ! std::copy(first, last, result.inserter()); ! return result; ! } ! /*************************************************************************************************/ template <typename T> dictionary_t dictionary_ctor(const char* k0, const T& v0) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! return result; ! } template <typename K0, typename V0, typename K1, typename V1> ! dictionary_t dictionary_ctor( const K0& k0, const V0& v0, ! const K1& k1, const V1& v1 ) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! result.set(name_t(k1), v1); ! return result; ! } ! /*************************************************************************************************/ class dictionary_t::const_iterator : ! public std::iterator<std::bidirectional_iterator_tag, dictionary_t::value_type, ! dictionary_t::difference_type, dictionary_t::const_pointer, dictionary_t::const_reference> ! ! { ! public: ! typedef dictionary_t::const_reference const_reference; ! typedef dictionary_t::const_pointer const_pointer; ! ! const_iterator(const const_iterator& x); ! ~const_iterator() throw(); ! ! const_iterator& operator= (const const_iterator& x); ! const_reference operator* () const throw(); ! const_pointer operator -> () const throw(); ! const_iterator& operator++ () throw(); ! const_iterator operator++ (int); ! const_iterator& operator-- () throw(); ! const_iterator operator-- (int); ! bool operator== (const const_iterator& rhs) const throw(); ! bool operator!= (const const_iterator& rhs) const throw(); ! protected: ! friend class dictionary_t; ! ! class begin { }; ! class end { }; ! ! const_iterator(const dictionary_t&, begin); ! const_iterator(const dictionary_t&, end); ! const_iterator(const dictionary_t&, name_t x); // Find form ! private: ! class implementation; ! const_iterator::implementation* object; ! }; ! /*************************************************************************************************/ inline dictionary_t::const_iterator dictionary_t::begin() const ! { return const_iterator(*this, const_iterator::begin()); } ! inline dictionary_t::const_iterator dictionary_t::end() const ! { return const_iterator(*this, const_iterator::end()); } ! inline dictionary_t::const_reverse_iterator dictionary_t::rbegin() const ! { return const_reverse_iterator(end()); } inline dictionary_t::const_reverse_iterator dictionary_t::rend() const ! { return const_reverse_iterator(begin()); } /*************************************************************************************************/ ! } // namespace adobe --- 94,188 ---- template <typename T> inline const typename promote<T>::type& dictionary_t::get(name_t key) const ! { return dictionary_get<T>()(*this, key, select<T>()); } ! template <typename T> inline void dictionary_t::get(name_t key, T& value) const ! { dictionary_get<T>()(*this, key, value); } ! /*************************************************************************************************/ template <class InputIterator> dictionary_t dictionary_ctor(InputIterator first, InputIterator last) ! { ! dictionary_t result; ! std::copy(first, last, result.inserter()); ! return result; ! } ! /*************************************************************************************************/ template <typename T> dictionary_t dictionary_ctor(const char* k0, const T& v0) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! return result; ! } template <typename K0, typename V0, typename K1, typename V1> ! dictionary_t dictionary_ctor( const K0& k0, const V0& v0, ! const K1& k1, const V1& v1 ) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! result.set(name_t(k1), v1); ! return result; ! } ! /*************************************************************************************************/ class dictionary_t::const_iterator : ! public std::iterator<std::bidirectional_iterator_tag, dictionary_t::value_type, ! dictionary_t::difference_type, dictionary_t::const_pointer, dictionary_t::const_reference> ! ! { ! public: ! typedef dictionary_t::const_reference const_reference; ! typedef dictionary_t::const_pointer const_pointer; ! ! const_iterator(const const_iterator& x); ! ~const_iterator() throw(); ! ! const_iterator& operator= (const const_iterator& x); ! const_reference operator* () const throw(); ! const_pointer operator -> () const throw(); ! const_iterator& operator++ () throw(); ! const_iterator operator++ (int); ! const_iterator& operator-- () throw(); ! const_iterator operator-- (int); ! bool operator== (const const_iterator& rhs) const throw(); ! bool operator!= (const const_iterator& rhs) const throw(); ! protected: ! friend class dictionary_t; ! ! class begin { }; ! class end { }; ! ! const_iterator(const dictionary_t&, begin); ! const_iterator(const dictionary_t&, end); ! const_iterator(const dictionary_t&, name_t x); // Find form ! private: ! class implementation; ! const_iterator::implementation* object; ! }; ! /*************************************************************************************************/ inline dictionary_t::const_iterator dictionary_t::begin() const ! { return const_iterator(*this, const_iterator::begin()); } ! inline dictionary_t::const_iterator dictionary_t::end() const ! { return const_iterator(*this, const_iterator::end()); } ! inline dictionary_t::const_reverse_iterator dictionary_t::rbegin() const ! { return const_reverse_iterator(end()); } inline dictionary_t::const_reverse_iterator dictionary_t::rend() const ! { return const_reverse_iterator(begin()); } /*************************************************************************************************/ ! } // namespace adobe Index: static_table.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/static_table.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** static_table.hpp 6 Jan 2006 18:35:02 -0000 1.5 --- static_table.hpp 3 Feb 2006 18:20:41 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,56 **** struct static_table_traits { ! typedef bool result_type; ! typedef KeyType key_type; ! typedef ValueType value_type; ! typedef std::pair<key_type, value_type> entry_type; ! result_type operator()(const entry_type& x, const entry_type& y) const ! { ! return (*this)(x, y.first); ! } ! // revisit: MM. For debugging purposes, VC 8 requires the definition of ! // this (unnecessary overload) in debug versions. ! result_type operator()(const key_type& x, const entry_type& y) const ! { ! return x < y.first; ! } ! result_type operator()(const entry_type& x, const key_type& y) const ! { ! return x.first < y; ! } ! result_type equal(const key_type& x, const key_type& y) const ! { ! return x == y; ! } }; --- 27,56 ---- struct static_table_traits { ! typedef bool result_type; ! typedef KeyType key_type; ! typedef ValueType value_type; ! typedef std::pair<key_type, value_type> entry_type; ! result_type operator()(const entry_type& x, const entry_type& y) const ! { ! return (*this)(x, y.first); ! } ! // revisit: MM. For debugging purposes, VC 8 requires the definition of ! // this (unnecessary overload) in debug versions. ! result_type operator()(const key_type& x, const entry_type& y) const ! { ! return x < y.first; ! } ! result_type operator()(const entry_type& x, const key_type& y) const ! { ! return x.first < y; ! } ! result_type equal(const key_type& x, const key_type& y) const ! { ! return x == y; ! } }; *************** *** 60,97 **** struct static_table { ! typedef Traits traits_type; ! typedef typename traits_type::key_type key_type; ! typedef typename traits_type::value_type value_type; ! typedef typename traits_type::entry_type entry_type; ! const value_type& operator()(const key_type& key) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! throw std::logic_error("static_table key not found"); ! return iter->second; ! } ! bool operator()(const key_type& key, value_type& result) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! return false; ! result = iter->second; ! return true; ! } ! void sort() ! { ! adobe::sort(table_m, traits_type()); ! } public: ! entry_type table_m[Size]; }; --- 60,97 ---- struct static_table { ! typedef Traits traits_type; ! typedef typename traits_type::key_type key_type; ! typedef typename traits_type::value_type value_type; ! typedef typename traits_type::entry_type entry_type; ! const value_type& operator()(const key_type& key) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! throw std::logic_error("static_table key not found"); ! return iter->second; ! } ! bool operator()(const key_type& key, value_type& result) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! return false; ! result = iter->second; ! return true; ! } ! void sort() ! { ! adobe::sort(table_m, traits_type()); ! } public: ! entry_type table_m[Size]; }; Index: extents.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/extents.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** extents.hpp 6 Jan 2006 18:35:02 -0000 1.6 --- extents.hpp 3 Feb 2006 18:20:41 -0000 1.7 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,56 **** struct point_2d : boost::equality_comparable<point_2d<T> > { ! point_2d() : ! x_m(T()), y_m(T()) ! { } ! point_2d(const T& x, const T& y) : ! x_m(x), y_m(y) ! { } ! T x_m; ! T y_m; ! ! friend inline void swap(const point_2d& x, const point_2d& y) ! { ! adobe::adl_swap(x.x_m, y.x_m); ! adobe::adl_swap(x.y_m, y.y_m); ! } ! ! friend inline void operator==(const point_2d& x, const point_2d& y) ! { ! return (x.x_m == y.x_m) && (x.y_m == y.y_m); ! } }; ! typedef std::pair<long, long> pair_long_t; ! typedef point_2d<long> point_2d_t; ! typedef std::vector<long> guide_set_t; // REVISIT (sparent) : points of interest need to be named entities. This will become: --- 27,56 ---- struct point_2d : boost::equality_comparable<point_2d<T> > { ! point_2d() : ! x_m(T()), y_m(T()) ! { } ! point_2d(const T& x, const T& y) : ! x_m(x), y_m(y) ! { } ! T x_m; ! T y_m; ! ! friend inline void swap(const point_2d& x, const point_2d& y) ! { ! adobe::adl_swap(x.x_m, y.x_m); ! adobe::adl_swap(x.y_m, y.y_m); ! } ! ! friend inline void operator==(const point_2d& x, const point_2d& y) ! { ! return (x.x_m == y.x_m) && (x.y_m == y.y_m); ! } }; ! typedef std::pair<long, long> pair_long_t; ! typedef point_2d<long> point_2d_t; ! typedef std::vector<long> guide_set_t; // REVISIT (sparent) : points of interest need to be named entities. This will become: *************** *** 59,64 **** struct guide_set_t { ! adobe::name_t name_m; ! long offset_m; }; typedef std::vector<guide_set_t> point_of_interest_set_t; --- 59,64 ---- struct guide_set_t { ! adobe::name_t name_m; ! long offset_m; }; typedef std::vector<guide_set_t> point_of_interest_set_t; *************** *** 69,73 **** struct extents_slices_t { ! enum slice_select_t { horizontal, vertical }; }; --- 69,73 ---- struct extents_slices_t { ! enum slice_select_t { horizontal, vertical }; }; *************** *** 76,110 **** struct extents_t : #if !defined(ADOBE_NO_DOCUMENTATION) ! private extents_slices_t, boost::equality_comparable<extents_t> #endif { ! struct slice_t : boost::equality_comparable<slice_t> ! { ! slice_t() : length_m(0) { }; ! long length_m; ! pair_long_t outset_m; ! pair_long_t frame_m; ! pair_long_t inset_m; ! guide_set_t poi_m; ! ! friend bool operator ==(const slice_t& x, const slice_t& y); ! }; ! boost::array<slice_t, 2> slice_m; ! slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } ! slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } ! const slice_t& vertical() const { return slice_m[extents_slices_t::vertical]; } ! const slice_t& horizontal() const { return slice_m[extents_slices_t::horizontal]; } ! long& height() { return vertical().length_m; } ! long& width() { return horizontal().length_m; } ! const long& height() const { return vertical().length_m; } ! const long& width() const { return horizontal().length_m; } ! ! friend bool operator == (const extents_t& x, const extents_t& y); }; --- 76,110 ---- struct extents_t : #if !defined(ADOBE_NO_DOCUMENTATION) ! private extents_slices_t, boost::equality_comparable<extents_t> #endif { ! struct slice_t : boost::equality_comparable<slice_t> ! { ! slice_t() : length_m(0) { }; ! long length_m; ! pair_long_t outset_m; ! pair_long_t frame_m; ! pair_long_t inset_m; ! guide_set_t poi_m; ! ! friend bool operator ==(const slice_t& x, const slice_t& y); ! }; ! boost::array<slice_t, 2> slice_m; ! slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } ! slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } ! const slice_t& vertical() const { return slice_m[extents_slices_t::vertical]; } ! const slice_t& horizontal() const { return slice_m[extents_slices_t::horizontal]; } ! long& height() { return vertical().length_m; } ! long& width() { return horizontal().length_m; } ! const long& height() const { return vertical().length_m; } ! const long& width() const { return horizontal().length_m; } ! ! friend bool operator == (const extents_t& x, const extents_t& y); }; *************** *** 112,120 **** #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t& x); #endif #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t::slice_t& x); #endif --- 112,120 ---- #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t& x); #endif #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t::slice_t& x); #endif *************** *** 129,137 **** template <> inline void swap(adobe::extents_t::slice_t& x, adobe::extents_t::slice_t& y) { ! adobe::adl_swap(x.length_m, y.length_m); ! adobe::adl_swap(x.outset_m, y.outset_m); ! adobe::adl_swap(x.frame_m, y.frame_m); ! adobe::adl_swap(x.inset_m, y.inset_m); ! adobe::adl_swap(x.poi_m, y.poi_m); } --- 129,137 ---- template <> inline void swap(adobe::extents_t::slice_t& x, adobe::extents_t::slice_t& y) { ! adobe::adl_swap(x.length_m, y.length_m); ! adobe::adl_swap(x.outset_m, y.outset_m); ! adobe::adl_swap(x.frame_m, y.frame_m); ! adobe::adl_swap(x.inset_m, y.inset_m); ! adobe::adl_swap(x.poi_m, y.poi_m); } Index: functional.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/functional.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functional.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- functional.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,31 **** struct element { ! typedef typename boost::tuples::element<N, T>::type type; }; --- 27,31 ---- struct element { ! typedef typename boost::tuples::element<N, T>::type type; }; *************** *** 33,37 **** struct element<0, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::first_type type; }; --- 33,37 ---- struct element<0, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::first_type type; }; *************** *** 39,43 **** struct element<1, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::second_type type; }; --- 39,43 ---- struct element<1, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::second_type type; }; *************** *** 47,55 **** struct get_element : std::unary_function<T, typename element<N, T>::type> { ! typename element<N, T>::type& operator()(T& x) const ! { return boost::get<N>(x); } ! ! const typename element<N, T>::type& operator()(const T& x) const ! { return boost::get<N>(x); } }; --- 47,55 ---- struct get_element : std::unary_function<T, typename element<N, T>::type> { ! typename element<N, T>::type& operator()(T& x) const ! { return boost::get<N>(x); } ! ! const typename element<N, T>::type& operator()(const T& x) const ! { return boost::get<N>(x); } }; *************** *** 58,71 **** template <typename T1, typename T2> // T is pair or tuple struct get_element<0, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::first_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::first_type result_type; ! result_type& operator()(argument_type& x) const ! { return x.first; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.first; } }; --- 58,71 ---- template <typename T1, typename T2> // T is pair or tuple struct get_element<0, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::first_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::first_type result_type; ! result_type& operator()(argument_type& x) const ! { return x.first; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.first; } }; *************** *** 74,87 **** template <typename T1, typename T2> // T is pair or tuple struct get_element<1, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::second_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::second_type result_type; ! ! result_type& operator()(argument_type& x) const ! { return x.second; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.second; } }; --- 74,87 ---- template <typename T1, typename T2> // T is pair or tuple struct get_element<1, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::second_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::second_type result_type; ! ! result_type& operator()(argument_type& x) const ! { return x.second; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.second; } }; *************** *** 91,96 **** struct identity : std::unary_function<T, T> { ! T& operator()(T& x) const { return x; } ! const T& operator()(const T& x) const { return x; } }; --- 91,96 ---- struct identity : std::unary_function<T, T> { ! T& operator()(T& x) const { return x; } ! const T& operator()(const T& x) const { return x; } }; *************** *** 100,104 **** struct always_true : std::unary_function<T, bool> { ! bool operator()(const T&) const { return true; } }; --- 100,104 ---- struct always_true : std::unary_function<T, bool> { ! bool operator()(const T&) const { return true; } }; *************** *** 128,133 **** struct delete_ptr<T*> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; --- 128,133 ---- struct delete_ptr<T*> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; *************** *** 135,140 **** struct delete_ptr<T* const> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; --- 135,140 ---- struct delete_ptr<T* const> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; *************** *** 154,159 **** struct delete_ptr<T(*)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; --- 154,159 ---- struct delete_ptr<T(*)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; *************** *** 161,166 **** struct delete_ptr<T(* const)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; --- 161,166 ---- struct delete_ptr<T(* const)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; *************** *** 208,212 **** struct generator_t { ! typedef Result result_type; }; --- 208,212 ---- struct generator_t { ! typedef Result result_type; }; *************** *** 220,227 **** #endif { ! explicit sequence_t(const T& x) : data_m(x) { } ! T operator () () { return data_m++; } private: ! T data_m; }; --- 220,227 ---- #endif { ! explicit sequence_t(const T& x) : data_m(x) { } ! T operator () () { return data_m++; } private: ! T data_m; }; *************** *** 231,256 **** struct compare_members_t : std::binary_function<T, T, bool> { ! compare_members_t(R T::* member, Compare compare) : ! compare_m(compare), ! member_m(member) ! { } ! bool operator () (const T& x, const T& y) const ! { return compare_m(x.*member_m, y.*member_m); } ! ! bool operator () (const T& x, const R& y) const ! { return compare_m(x.*member_m, y); } ! ! bool operator () (const R& x, const T& y) const ! { return compare_m(x, y.*member_m); } private: /* ! REVISIT (sparent) : This could probably use an empty member optimization. */ ! Compare compare_m; ! R T::* member_m; }; --- 231,256 ---- struct compare_members_t : std::binary_function<T, T, bool> { ! compare_members_t(R T::* member, Compare compare) : ! compare_m(compare), ! member_m(member) ! { } ! bool operator () (const T& x, const T& y) const ! { return compare_m(x.*member_m, y.*member_m); } ! ! bool operator () (const T& x, const R& y) const ! { return compare_m(x.*member_m, y); } ! ! bool operator () (const R& x, const T& y) const ! { return compare_m(x, y.*member_m); } private: /* ! REVISIT (sparent) : This could probably use an empty member optimization. */ ! Compare compare_m; ! R T::* member_m; }; *************** *** 258,262 **** compare_members_t<T, R, std::less<R> > compare_members(R T::* member) { ! return compare_members_t<T, R, std::less<R> >(member, std::less<R>() ); } --- 258,262 ---- compare_members_t<T, R, std::less<R> > compare_members(R T::* member) { ! return compare_members_t<T, R, std::less<R> >(member, std::less<R>() ); } *************** *** 264,268 **** compare_members_t<T, R, Compare> compare_members(R T::* member, Compare compare) { ! return compare_members_t<T, R, Compare>(member, compare); } --- 264,268 ---- compare_members_t<T, R, Compare> compare_members(R T::* member, Compare compare) { ! return compare_members_t<T, R, Compare>(member, compare); } *************** *** 270,284 **** /* REVISIT (sparent) : ! This work is to be part of table indexes. A table index is a container of pointers to ! objects with a transformation. ! ! Getting to the key in a table is an indirect transformation ! Getting to a row in a table is an indirection ! ! Note indirection is a transformation - so it is two levels of transformation. ! ! To sort a table by the key I want to be able to do: ! ! adobe::sort(index.base(), index.transform_compare()); */ --- 270,284 ---- /* REVISIT (sparent) : ! This work is to be part of table indexes. A table index is a container of pointers to ! objects with a transformation. ! ! Getting to the key in a table is an indirect transformation ! Getting to a row in a table is an indirection ! ! Note indirection is a transformation - so it is two levels of transformation. ! ! To sort a table by the key I want to be able to do: ! ! adobe::sort(index.base(), index.transform_compare()); */ *************** *** 288,303 **** struct transform_member_t : std::unary_function<T, R&> { ! explicit transform_member_t(R T::* member) : ! member_m(member) ! { } ! ! R& operator () (T& x) const ! { return x.*member_m; } ! ! const R& operator () (const T& x) const ! { return x.*member_m; } private: ! R T::* member_m; }; --- 288,303 ---- struct transform_member_t : std::unary_function<T, R&> { ! explicit transform_member_t(R T::* member) : ! member_m(member) ! { } ! ! R& operator () (T& x) const ! { return x.*member_m; } ! ! const R& operator () (const T& x) const ! { return x.*member_m; } private: ! R T::* member_m; }; *************** *** 305,309 **** transform_member_t<T, R> make_transform(R T::* member) { ! return transform_member_t<T, R>(member); } --- 305,309 ---- transform_member_t<T, R> make_transform(R T::* member) { ! return transform_member_t<T, R>(member); } *************** *** 313,321 **** struct indirect_t : std::unary_function<Pointer, Reference> { ! Reference& operator () (Pointer& x) const ! { return *x; } ! const Reference& operator () (const Pointer& x) const ! { return *x; } }; --- 313,321 ---- struct indirect_t : std::unary_function<Pointer, Reference> { ! Reference& operator () (Pointer& x) const ! { return *x; } ! const Reference& operator () (const Pointer& x) const ! { return *x; } }; *************** *** 324,330 **** template <class T> struct bitwise_or ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x | y;} }; --- 324,330 ---- template <class T> struct bitwise_or ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x | y;} }; *************** *** 333,339 **** template <class T> struct bitwise_and ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x & y;} }; --- 333,339 ---- template <class T> struct bitwise_and ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x & y;} }; *************** *** 342,348 **** template <class T> struct bitwise_xor ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x ^ y;} }; --- 342,348 ---- template <class T> struct bitwise_xor ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x ^ y;} }; Index: md5.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/md5.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** md5.hpp 6 Jan 2006 18:35:02 -0000 1.3 --- md5.hpp 3 Feb 2006 18:20:41 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,26 **** /* ! Relevant copyright information is provided below and may not be removed from this file. ! Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. */ --- 20,26 ---- /* ! Relevant copyright information is provided below and may not be removed from this file. ! Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. */ *************** *** 28,52 **** /* ! MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm ! Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights ! reserved. ! License to copy and use this software is granted provided that it is ! identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in ! all material mentioning or referencing this software or this function. ! License is also granted to make and use derivative works provided that such ! works are identified as "derived from the RSA Data Security, Inc. MD5 ! Message-Digest Algorithm" in all material mentioning or referencing the ! derived work. ! ! RSA Data Security, Inc. makes no representations concerning either the ! merchantability of this software or the suitability of this software for ! any particular purpose. It is provided "as is" without express or implied ! warranty of any kind. ! ! These notices must be retained in any copies of any part of this ! documentation and/or software. */ --- 28,52 ---- /* ! MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm ! Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights ! reserved. ! License to copy and use this software is granted provided that it is ! identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in ! all material mentioning or referencing this software or this function. ! License is also granted to make and use derivative works provided that such ! works are identified as "derived from the RSA Data Security, Inc. MD5 ! Message-Digest Algorithm" in all material mentioning or referencing the ! derived work. ! ! RSA Data Security, Inc. makes no representations concerning either the ! merchantability of this software or the suitability of this software for ! any particular purpose. It is provided "as is" without express or implied ! warranty of any kind. ! ! These notices must be retained in any copies of any part of this ! documentation and/or software. */ *************** *** 60,77 **** { public: ! typedef boost::array<boost::uint8_t, 16> digest_t; ! md5_t(); ! void update(void* input_block, std::size_t input_length); ! digest_t final(); private: ! void reset(); ! boost::uint32_t state_m[4]; /* state (ABCD) */ ! boost::uint32_t count_m[2]; /* number of bits, modulo 2^64 (lsb first) */ ! boost::uint8_t buffer_m[64]; /* input buffer */ }; --- 60,77 ---- { public: ! typedef boost::array<boost::uint8_t, 16> digest_t; ! md5_t(); ! void update(void* input_block, std::size_t input_length); ! digest_t final(); private: ! void reset(); ! boost::uint32_t state_m[4]; /* state (ABCD) */ ! boost::uint32_t count_m[2]; /* number of bits, modulo 2^64 (lsb first) */ ! boost::uint8_t buffer_m[64]; /* input buffer */ }; *************** *** 80,88 **** inline md5_t::digest_t md5(void* input_block, std::size_t input_length) { ! md5_t m; ! m.update(input_block, input_length); ! return m.final(); } --- 80,88 ---- inline md5_t::digest_t md5(void* input_block, std::size_t input_length) { ! md5_t m; ! m.update(input_block, input_length); ! return m.final(); } Index: conversion.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/conversion.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conversion.hpp 6 Jan 2006 18:35:02 -0000 1.4 --- conversion.hpp 3 Feb 2006 18:20:41 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 21,34 **** struct promote { ! typedef T type; }; ! template <> struct promote<short> { typedef double type; }; ! template <> struct promote<unsigned short> { typedef double type; }; ! template <> struct promote<int> { typedef double type; }; ! template <> struct promote<unsigned int> { typedef double type; }; ! template <> struct promote<long> { typedef double type; }; ! template <> struct promote<unsigned long> { typedef double type; }; ! template <> struct promote<float> { typedef double type; }; /*************************************************************************************************/ --- 21,34 ---- struct promote { ! typedef T type; }; ! template <> struct promote<short> { typedef double type; }; ! template <> struct promote<unsigned short> { typedef double type; }; ! template <> struct promote<int> { typedef double type; }; ! template <> struct promote<unsigned int> { typedef double type; }; ! template <> struct promote<long> { typedef double type; }; ! template <> struct promote<unsigned long> { typedef double type; }; ! template <> struct promote<float> { typedef double type; }; /*************************************************************************************************/ *************** *** 36,40 **** template <typename lht, typename rht> inline lht explicit_cast(const rht& rhs) ! { return static_cast<lht>(rhs); } /*************************************************************************************************/ --- 36,40 ---- template <typename lht, typename rht> inline lht explicit_cast(const rht& rhs) ! { return static_cast<lht>(rhs); } /*************************************************************************************************/ *************** *** 42,46 **** template <typename T> inline T& remove_const(const T& x) ! { return const_cast<T&>(x); } /*************************************************************************************************/ --- 42,46 ---- template <typename T> inline T& remove_const(const T& x) ! { return const_cast<T&>(x); } /*************************************************************************************************/ Index: unicode.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/unicode.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** unicode.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- unicode.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 75,108 **** // REVISIT (fbrereto) : I don't need to INIT_ONCE these, do I? ! const unsigned char to_utf32_pivot_1_k(128); ! const unsigned char to_utf32_pivot_2_k(192); ! const unsigned char to_utf32_pivot_3_k(224); ! const unsigned char to_utf32_pivot_4_k(240); ! const unsigned char to_utf32_pivot_5_k(248); ! const unsigned char to_utf32_pivot_6_k(252); ! const unsigned char to_utf32_pivot_7_k(254); ! const boost::uint32_t to_utf8_pivot_1_k(1UL << 7); ! const boost::uint32_t to_utf8_pivot_2_k(1UL << 11); ! const boost::uint32_t to_utf8_pivot_3_k(1UL << 16); ! const boost::uint32_t to_utf8_pivot_4_k(1UL << 21); ! const boost::uint32_t to_utf8_pivot_5_k(1UL << 26); ! const boost::uint16_t to_utf16_surrogate_pivot_k(65535); ! const boost::uint16_t utf16_high_surrogate_front_k(0xd800); ! const boost::uint16_t utf16_high_surrogate_back_k(0xdbff); ! const boost::uint16_t utf16_low_surrogate_front_k(0xdc00); ! const boost::uint16_t utf16_low_surrogate_back_k(0xdfff); /*************************************************************************************************/ ! template <std::size_t NumBytes> struct utf8_header_t { }; ! template <> struct utf8_header_t<0> { enum { value = char(0x80) }; }; // nonheader ! //template <> struct utf8_header_t<1> { enum { value = char(0x00) }; }; // illegal ! template <> struct utf8_header_t<2> { enum { value = char(0xC0) }; }; ! template <> struct utf8_header_t<3> { enum { value = char(0xE0) }; }; ! template <> struct utf8_header_t<4> { enum { value = char(0xF0) }; }; ! template <> struct utf8_header_t<5> { enum { value = char(0xF8) }; }; ! template <> struct utf8_header_t<6> { enum { value = char(0xFC) }; }; /*************************************************************************************************/ --- 75,108 ---- // REVISIT (fbrereto) : I don't need to INIT_ONCE these, do I? ! const unsigned char to_utf32_pivot_1_k(128); ! const unsigned char to_utf32_pivot_2_k(192); ! const unsigned char to_utf32_pivot_3_k(224); ! const unsigned char to_utf32_pivot_4_k(240); ! const unsigned char to_utf32_pivot_5_k(248); ! const unsigned char to_utf32_pivot_6_k(252); ! const unsigned char to_utf32_pivot_7_k(254); ! const boost::uint32_t to_utf8_pivot_1_k(1UL << 7); ! const boost::uint32_t to_utf8_pivot_2_k(1UL << 11); ! const boost::uint32_t to_utf8_pivot_3_k(1UL << 16); ! const boost::uint32_t to_utf8_pivot_4_k(1UL << 21); ! const boost::uint32_t to_utf8_pivot_5_k(1UL << 26); ! const boost::uint16_t to_utf16_surrogate_pivot_k(65535); ! const boost::uint16_t utf16_high_surrogate_front_k(0xd800); ! const boost::uint16_t utf16_high_surrogate_back_k(0xdbff); ! const boost::uint16_t utf16_low_surrogate_front_k(0xdc00); ! const boost::uint16_t utf16_low_surrogate_back_k(0xdfff); /*************************************************************************************************/ ! template <std::size_t NumBytes> struct utf8_header_t { }; ! template <> struct utf8_header_t<0> { enum { value = char(0x80) }; }; // nonheader ! //template <> struct utf8_header_t<1> { enum { value = char(0x00) }; }; // illegal ! template <> struct utf8_header_t<2> { enum { value = char(0xC0) }; }; ! template <> struct utf8_header_t<3> { enum { value = char(0xE0) }; }; ! template <> struct utf8_header_t<4> { enum { value = char(0xF0) }; }; ! template <> struct utf8_header_t<5> { enum { value = char(0xF8) }; }; ! template <> struct utf8_header_t<6> { enum { value = char(0xFC) }; }; /*************************************************************************************************/ *************** *** 157,169 **** struct demotion_engine_t { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<ByteCount, Header>(demote_fragment<ByteCount>(code)); ! ++i; ! return demotion_engine_t<ByteCount - 1, false>()(code, i); ! } }; --- 157,169 ---- struct demotion_engine_t { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<ByteCount, Header>(demote_fragment<ByteCount>(code)); ! ++i; ! return demotion_engine_t<ByteCount - 1, false>()(code, i); ! } }; *************** *** 171,181 **** struct demotion_engine_t<1, false> { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<0, false>(demote_fragment<1>(code)); ! return ++i; ! } }; --- 171,181 ---- struct demotion_engine_t<1, false> { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<0, false>(demote_fragment<1>(code)); ! return ++i; ! } }; *************** *** 185,206 **** struct promotion_engine_t { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator last) ! { ! /* ! CodeWarrior 9.4 doesn't like this code composited into one line; ! GCC doesn't seem to have a problem. ! */ ! char n(*first); ! char stripped(utf8_strip_mask<ByteCount, Header>(n)); ! boost::uint32_t shifted(promote_fragment<ByteCount>(stripped)); ! ++first; ! if (first == last) throw std::runtime_error("unicode: utf32 conversion ran out of input"); ! return shifted | promotion_engine_t<ByteCount - 1, false>()(first, last); ! } }; --- 185,206 ---- struct promotion_engine_t { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator last) ! { ! /* ! CodeWarrior 9.4 doesn't like this code composited into one line; ! GCC doesn't seem to have a problem. ! */ ! char n(*first); ! char stripped(utf8_strip_mask<ByteCount, Header>(n)); ! boost::uint32_t shifted(promote_fragment<ByteCount>(stripped)); ! ++first; ! if (first == last) throw std::runtime_error("unicode: utf32 conversion ran out of input"); ! return shifted | promotion_engine_t<ByteCount - 1, false>()(first, last); ! } }; *************** *** 208,220 **** struct promotion_engine_t<1, false> { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator) ! { ! boost::uint32_t result(promote_fragment<1>(utf8_strip_mask<0, false>(*first))); ! ++first; ! return result; ! } }; --- 208,220 ---- struct promotion_engine_t<1, false> { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator) ! { ! boost::uint32_t result(promote_fragment<1>(utf8_strip_mask<0, false>(*first))); ! ++first; ! return result; ! } }; *************** *** 223,257 **** template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf16_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! boost::uint16_t code(static_cast<boost::uint16_t>(*first)); ! ++first; ! if (code >= implementation::utf16_high_surrogate_front_k && ! code <= implementation::utf16_high_surrogate_back_k) ! { ! result = 0; ! if (first == last) ! throw std::runtime_error("unicode: utf16 high surrogate found without low surrogate"); ! boost::uint16_t low(static_cast<boost::uint16_t>(*first)); ! assert (low >= implementation::utf16_low_surrogate_front_k && ! low <= implementation::utf16_low_surrogate_back_k); ! ++first; ! result = (code - implementation::utf16_high_surrogate_front_k) * 0x400 + ! (low - implementation::utf16_low_surrogate_front_k) + 0x10000; ! } ! else if ( code >= implementation::utf16_low_surrogate_front_k && ! code <= implementation::utf16_low_surrogate_back_k) ! { throw std::runtime_error("unicode: utf16 low surrogate found without high surrogate"); } ! else ! { result = static_cast<DestInteger>(code); } ! return first; } --- 223,257 ---- template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf16_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! boost::uint16_t code(static_cast<boost::uint16_t>(*first)); ! ++first; ! if (code >= implementation::utf16_high_surrogate_front_k && ! code <= implementation::utf16_high_surrogate_back_k) ! { ! result = 0; ! if (first == last) ! throw std::runtime_error("unicode: utf16 high surrogate found without low surrogate"); ! boost::uint16_t low(static_cast<boost::uint16_t>(*first)); ! assert (low >= implementation::utf16_low_surrogate_front_k && ! low <= implementation::utf16_low_surrogate_back_k); ! ++first; ! result = (code - implementation::utf16_high_surrogate_front_k) * 0x400 + ! (low - implementation::utf16_low_surrogate_front_k) + 0x10000; ! } ! else if ( code >= implementation::utf16_low_surrogate_front_k && ! code <= implementation::utf16_low_surrogate_back_k) ! { throw std::runtime_error("unicode: utf16 low surrogate found without high surrogate"); } ! else ! { result = static_cast<DestInteger>(code); } ! return first; } *************** *** 260,285 **** template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf8_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! unsigned char n(static_cast<unsigned char>(*first)); ! if (n < implementation::to_utf32_pivot_1_k) ! { result = static_cast<DestInteger>(n); ++first; } ! else if (n < i... [truncated message content] |