| 101 | } |
| 102 | |
| 103 | int gzstreambuf::flush_buffer() { |
| 104 | // Separate the writing of the buffer from overflow() and |
| 105 | // sync() operation. |
| 106 | int w = pptr() - pbase(); |
| 107 | if ( gzwrite( file, pbase(), w) != w) |
| 108 | return EOF; |
| 109 | pbump( -w); |
| 110 | return w; |
| 111 | } |
| 112 | |
| 113 | int gzstreambuf::overflow( int c) { // used for output buffer only |
| 114 | if ( ! ( mode & std::ios::out) || ! opened) |