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

Modified Files:
        aggregate.hpp gzip.hpp line.hpp zlib.hpp 
Log Message:
Added Kim Barrett's patches that merge the changes from 1.33.1 into cvs HEAD.

Index: aggregate.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iostreams/filter/aggregate.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- aggregate.hpp       15 Jul 2005 23:47:02 -0000      1.1
+++ aggregate.hpp       26 May 2007 12:42:42 -0000      1.2
@@ -145,7 +145,7 @@
         do_close();
     }
 
-    enum {
+    enum flag_type {
         f_read   = 1,
         f_write  = f_read << 1,
         f_eof    = f_write << 1

Index: gzip.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iostreams/filter/gzip.hpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gzip.hpp    9 Jun 2005 02:07:00 -0000       1.16
+++ gzip.hpp    26 May 2007 12:42:42 -0000      1.17
@@ -234,14 +234,20 @@
     template<typename Sink>
     void close(Sink& snk, BOOST_IOS::openmode m)
     {
+        namespace io = boost::iostreams;
+
         if (m & BOOST_IOS::out) {
 
             // Close zlib compressor.
             base_type::close(snk, BOOST_IOS::out);
 
-            // Write final fields of gzip file format.
-            write_long(this->crc(), snk);
-            write_long(this->total_in(), snk);
+            if (flags_ & f_header_done) {
+
+                // Write final fields of gzip file format.
+                write_long(this->crc(), snk);
+                write_long(this->total_in(), snk);
+            }
+
         }
         #if BOOST_WORKAROUND(__GNUC__, == 2) && defined(__STL_CONFIG_H) || \
             BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) \
@@ -267,7 +273,7 @@
         boost::iostreams::put(next, static_cast<char>(0xFF & (n >> 24)));
     }
 
-    enum {
+    enum flag_type {
         f_header_done = 1,
         f_body_done = f_header_done << 1,
         f_footer_done = f_body_done << 1
@@ -456,7 +462,7 @@
         if (static_cast<int>(read_uint32(rng, gzip::bad_footer)) != 
this->total_out())
             throw gzip_error(gzip::bad_length);
     }
-    enum {
+    enum flag_type {
         f_header_read  = 1,
         f_footer_read  = f_header_read << 1,
         f_text         = f_footer_read << 1
@@ -547,11 +553,11 @@
         static_cast<streamsize>(str.size() - offset_);
     streamsize amt = (std::min)(avail, n);
     std::copy( str.data() + offset_,
-                str.data() + offset_ + amt,
-                s );
+               str.data() + offset_ + amt,
+               s );
     offset_ += amt;
     if ( !(flags_ & f_header_done) &&
-            offset_ == static_cast<std::size_t>(str.size()) )
+         offset_ == static_cast<std::size_t>(str.size()) )
     {
         flags_ |= f_header_done;
     }

Index: line.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iostreams/filter/line.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- line.hpp    15 Jul 2005 23:46:02 -0000      1.1
+++ line.hpp    26 May 2007 12:42:42 -0000      1.2
@@ -193,7 +193,7 @@
         pos_ = string_type::npos;
     }
 
-    enum {
+    enum flag_type {
         f_read   = 1,
         f_write  = f_read << 1
     };

Index: zlib.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iostreams/filter/zlib.hpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- zlib.hpp    21 Jul 2005 12:29:18 -0000      1.25
+++ zlib.hpp    26 May 2007 12:42:42 -0000      1.26
@@ -332,7 +332,7 @@
 
 template<typename Alloc>
 zlib_compressor_impl<Alloc>::~zlib_compressor_impl()
-{ /*reset(true, false);*/ }
+{ reset(true, false); }
 
 template<typename Alloc>
 bool zlib_compressor_impl<Alloc>::filter
@@ -357,7 +357,7 @@
 
 template<typename Alloc>
 zlib_decompressor_impl<Alloc>::~zlib_decompressor_impl()
-{ /*reset(false, false);*/ }
+{ reset(false, false); }
 
 template<typename Alloc>
 zlib_decompressor_impl<Alloc>::zlib_decompressor_impl(int window_bits)


-------------------------------------------------------------------------
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