Update of /cvsroot/boost/boost/boost/iostreams/detail/adapter
In directory 
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19574/boost/iostreams/detail/adapter

Modified Files:
        concept_adapter.hpp direct_adapter.hpp mode_adapter.hpp 
        non_blocking_adapter.hpp range_adapter.hpp 
Log Message:
Added Kim Barrett's patches that merge the changes from 1.33.1 into cvs HEAD.

Index: concept_adapter.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/iostreams/detail/adapter/concept_adapter.hpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- concept_adapter.hpp 20 May 2005 04:58:54 -0000      1.19
+++ concept_adapter.hpp 26 May 2007 12:42:42 -0000      1.20
@@ -80,16 +80,16 @@
     std::streamsize write(const char_type* s, std::streamsize n, Sink* snk)
     { return output_impl::write(t_, snk, s, n); }
 
-    stream_offset seek( stream_offset off, BOOST_IOS::seekdir way,
-                        BOOST_IOS::openmode which )
+    std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
+                         BOOST_IOS::openmode which )
     { 
         return this->seek( off, way, which, 
                            (basic_null_device<char_type, seekable>*) 0); 
     }
 
     template<typename Device>
-    stream_offset seek( stream_offset off, BOOST_IOS::seekdir way,
-                        BOOST_IOS::openmode which, Device* dev )
+    std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
+                         BOOST_IOS::openmode which, Device* dev )
     { return any_impl::seek(t_, dev, off, way, which); }
 
     void close(BOOST_IOS::openmode which)
@@ -122,7 +122,7 @@
 template<>
 struct device_wrapper_impl<any_tag> {
     template<typename Device, typename Dummy>
-    static stream_offset 
+    static std::streampos 
     seek( Device& dev, Dummy*, stream_offset off, 
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which )
     { 
@@ -131,7 +131,7 @@
     }
 
     template<typename Device>
-    static stream_offset 
+    static std::streampos 
     seek( Device&, stream_offset, BOOST_IOS::seekdir, 
           BOOST_IOS::openmode, any_tag )
     { 
@@ -139,7 +139,7 @@
     }
 
     template<typename Device>
-    static stream_offset 
+    static std::streampos 
     seek( Device& dev, stream_offset off, 
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which, 
           random_access )
@@ -191,7 +191,7 @@
 template<>
 struct flt_wrapper_impl<any_tag> {
     template<typename Filter, typename Device>
-    static stream_offset
+    static std::streampos
     seek( Filter& f, Device* dev, stream_offset off,
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which )
     {
@@ -200,13 +200,13 @@
     }
 
     template<typename Filter, typename Device>
-    static stream_offset
+    static std::streampos
     seek( Filter&, Device*, stream_offset,
           BOOST_IOS::seekdir, BOOST_IOS::openmode, any_tag )
     { throw cant_seek(); }
 
     template<typename Filter, typename Device>
-    static stream_offset
+    static std::streampos
     seek( Filter& f, Device* dev, stream_offset off,
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which,
           random_access tag )
@@ -216,14 +216,14 @@
     }
 
     template<typename Filter, typename Device>
-    static stream_offset
+    static std::streampos
     seek( Filter& f, Device* dev, stream_offset off,
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which,
           random_access, any_tag )
     { return f.seek(*dev, off, way); }
 
     template<typename Filter, typename Device>
-    static stream_offset
+    static std::streampos
     seek( Filter& f, Device* dev, stream_offset off,
           BOOST_IOS::seekdir way, BOOST_IOS::openmode which,
           random_access, two_sequence )

Index: direct_adapter.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/iostreams/detail/adapter/direct_adapter.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- direct_adapter.hpp  20 May 2005 05:28:13 -0000      1.20
+++ direct_adapter.hpp  26 May 2007 12:42:42 -0000      1.21
@@ -111,8 +111,8 @@
 
     std::streamsize read(char_type* s, std::streamsize n);
     std::streamsize write(const char_type* s, std::streamsize n);
-    stream_offset seek( stream_offset, BOOST_IOS::seekdir,
-                        BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out );
+    std::streampos seek( stream_offset, BOOST_IOS::seekdir,
+                         BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out 
);
     void close();
     void close(BOOST_IOS::openmode which);
 #ifndef BOOST_IOSTREAMS_NO_LOCALE
@@ -214,7 +214,7 @@
 }
 
 template<typename Direct>
-inline stream_offset direct_adapter<Direct>::seek
+inline std::streampos direct_adapter<Direct>::seek
     ( stream_offset off, BOOST_IOS::seekdir way, 
       BOOST_IOS::openmode which )
 {
@@ -248,7 +248,7 @@
         else
             bad_seek();
     }
-    return static_cast<stream_offset>(next);
+    return offset_to_position(next);
 }
 
 template<typename Direct>

Index: mode_adapter.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iostreams/detail/adapter/mode_adapter.hpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mode_adapter.hpp    20 May 2005 05:28:13 -0000      1.17
+++ mode_adapter.hpp    26 May 2007 12:42:42 -0000      1.18
@@ -48,9 +48,9 @@
 
     std::streamsize read(char_type* s, std::streamsize n);
     std::streamsize write(const char_type* s, std::streamsize n);
-    stream_offset seek( stream_offset off, BOOST_IOS::seekdir way,
-                        BOOST_IOS::openmode which = 
-                            BOOST_IOS::in | BOOST_IOS::out );
+    std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
+                         BOOST_IOS::openmode which = 
+                             BOOST_IOS::in | BOOST_IOS::out );
 #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
     void close(BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out);
 #endif
@@ -66,12 +66,12 @@
     { return iostreams::write(t_, snk, s, n); }
 
     template<typename Device>
-    stream_offset seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way)
+    std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way)
     { return iostreams::seek(t_, dev, off, way); }
 
     template<typename Device>
-    stream_offset seek( Device& dev, stream_offset off, 
-                        BOOST_IOS::seekdir way, BOOST_IOS::openmode which  )
+    std::streampos seek( Device& dev, stream_offset off, 
+                         BOOST_IOS::seekdir way, BOOST_IOS::openmode which  )
     { return iostreams::seek(t_, dev, off, way, which); }
 
     template<typename Device>
@@ -102,7 +102,7 @@
 { return boost::iostreams::write(t_, s, n); }
 
 template<typename Mode, typename T>
-stream_offset mode_adapter<Mode, T>::seek
+std::streampos mode_adapter<Mode, T>::seek
     (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
 { return boost::iostreams::seek(t_, off, way, which); }
 

Index: non_blocking_adapter.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/iostreams/detail/adapter/non_blocking_adapter.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- non_blocking_adapter.hpp    20 May 2005 05:28:13 -0000      1.6
+++ non_blocking_adapter.hpp    26 May 2007 12:42:42 -0000      1.7
@@ -44,9 +44,9 @@
         }
         return result;    
     }
-    stream_offset seek( stream_offset off, BOOST_IOS::seekdir way,
-                        BOOST_IOS::openmode which = 
-                            BOOST_IOS::in | BOOST_IOS::out )
+    std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
+                         BOOST_IOS::openmode which = 
+                             BOOST_IOS::in | BOOST_IOS::out )
     { return iostreams::seek(device_, off, way, which); }
 public:
     Device& device_;

Index: range_adapter.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/iostreams/detail/adapter/range_adapter.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- range_adapter.hpp   20 May 2005 04:11:10 -0000      1.12
+++ range_adapter.hpp   26 May 2007 12:42:42 -0000      1.13
@@ -62,7 +62,7 @@
     range_adapter(iterator first, iterator last);
     std::streamsize read(char_type* s, std::streamsize n);
     std::streamsize write(const char_type* s, std::streamsize n);
-    stream_offset seek(stream_offset off, BOOST_IOS::seekdir way);
+    std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
 private:
     iterator first_, cur_, last_;
 };
@@ -89,11 +89,11 @@
 
 
 template<typename Mode, typename Range>
-stream_offset range_adapter<Mode, Range>::seek
+std::streampos range_adapter<Mode, Range>::seek
     (stream_offset off, BOOST_IOS::seekdir way)
 { 
     impl::seek(first_, cur_, last_, off, way); 
-    return static_cast<stream_offset>(cur_ - first_);
+    return offset_to_position(cur_ - first_);
 }
 
 //------------------Implementation of 
range_adapter_impl----------------------//


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to