X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=zlib%2Fcontrib%2Fiostream%2Fzfstream.h;h=ed79098a3adaf5d4a33720325186e3e1c3df8a62;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=c87fa08e9d1b2c6bc6cc9206c0f6e8a3ca5825b3;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/zlib/contrib/iostream/zfstream.h b/zlib/contrib/iostream/zfstream.h index c87fa08e..ed79098a 100644 --- a/zlib/contrib/iostream/zfstream.h +++ b/zlib/contrib/iostream/zfstream.h @@ -1,6 +1,6 @@ -#ifndef _zfstream_h -#define _zfstream_h +#ifndef zfstream_h +#define zfstream_h #include #include "zlib.h" @@ -16,8 +16,8 @@ public: gzfilebuf *attach( int file_descriptor, int io_mode ); gzfilebuf *close(); - int setcompressionlevel( short comp_level ); - int setcompressionstrategy( short comp_strategy ); + int setcompressionlevel( int comp_level ); + int setcompressionstrategy( int comp_strategy ); inline int is_open() const { return (file !=NULL); } @@ -98,18 +98,19 @@ private: T val; }; -template gzofstream &operator<<(gzofstream &s, - const gzomanip &m) { +template gzofstream &operator<<(gzofstream &s, const gzomanip &m) +{ return (*m.func)(s, m.val); - } -inline gzofstream &setcompressionlevel( gzofstream &s, int l ) { +inline gzofstream &setcompressionlevel( gzofstream &s, int l ) +{ (s.rdbuf())->setcompressionlevel(l); return s; } -inline gzofstream &setcompressionstrategy( gzofstream &s, int l ) { +inline gzofstream &setcompressionstrategy( gzofstream &s, int l ) +{ (s.rdbuf())->setcompressionstrategy(l); return s; } @@ -125,18 +126,3 @@ inline gzomanip setcompressionstrategy(int l) } #endif - - - - - - - - - - - - - - -