Readd openNewStream function for gzdopen() via SMUSH

This commit is contained in:
James Brown 2003-12-13 11:03:42 +00:00
parent 135bea3ba8
commit ea93407848
2 changed files with 18 additions and 7 deletions

10
lab.cpp
View file

@ -90,6 +90,16 @@ Block *Lab::getFileBlock(const char *filename) const {
return new Block(data, i->second.len);
}
std::FILE *Lab::openNewStream(const char *filename) const {
file_map_type::const_iterator i = find_filename(filename);
if (i == file_map_.end())
return NULL;
std::fseek(f_, i->second.offset, SEEK_SET);
return f_;
}
int Lab::fileLength(const char *filename) const {
file_map_type::const_iterator i = find_filename(filename);
if (i == file_map_.end())