/[enigma]/enigma/lib-src/zipios++/src/zipoutputstream.cpp
ViewVC logotype

Diff of /enigma/lib-src/zipios++/src/zipoutputstream.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dheck, Tue Jun 10 22:09:57 2003 UTC revision 1.2 by dheck, Sun Jun 15 10:18:58 2003 UTC
# Line 8  Line 8 
8    
9  namespace zipios {  namespace zipios {
10    
11  ZipOutputStream::ZipOutputStream( ostream &os, streampos pos )  ZipOutputStream::ZipOutputStream( std::ostream &os )
12    : ostream( 0 ),    : std::ostream( 0 ),
13  // SGIs basic_ifstream calls istream with 0, but calls basic_ios constructor first??  // SGIs basic_ifstream calls istream with 0, but calls basic_ios constructor first??
14      ofs( 0 )      ofs( 0 )
15  {  {
16    ozf = new ZipOutputStreambuf( os.rdbuf(), pos ) ;    ozf = new ZipOutputStreambuf( os.rdbuf() ) ;
17        
18    init( ozf ) ;    init( ozf ) ;
19  }  }
20    
21    
22  ZipOutputStream::ZipOutputStream( const string &filename, streampos pos )  ZipOutputStream::ZipOutputStream( const std::string &filename )
23    : ostream( 0 ),    : std::ostream( 0 ),
24      ofs( 0 )      ofs( 0 )
25  {  {
26    ofs = new ofstream( filename.c_str(), ios::out | ios::binary ) ;    ofs = new std::ofstream( filename.c_str(), std::ios::out | std::ios::binary ) ;
27    ozf = new ZipOutputStreambuf( ofs->rdbuf(), pos ) ;    ozf = new ZipOutputStreambuf( ofs->rdbuf() ) ;
28    this->init( ozf ) ;    this->init( ozf ) ;
29  }  }
30    
# Line 49  void ZipOutputStream::putNextEntry( cons Line 49  void ZipOutputStream::putNextEntry( cons
49    ozf->putNextEntry( entry ) ;    ozf->putNextEntry( entry ) ;
50  }  }
51    
52    void ZipOutputStream::putNextEntry(const std::string& entryName) {
53      putNextEntry( ZipCDirEntry(entryName));
54    }
55    
56    
57  void ZipOutputStream::setComment( const string &comment ) {  void ZipOutputStream::setComment( const std::string &comment ) {
58    ozf->setComment( comment ) ;    ozf->setComment( comment ) ;
59  }  }
60    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26