Updated and regenerated docs.

[SVN r57254]
This commit is contained in:
John Maddock
2009-10-30 18:45:41 +00:00
parent 603e98d186
commit 898b49fa89
33 changed files with 221 additions and 199 deletions

View File

@ -258,11 +258,22 @@ void mapfile::lock(pointer* node)const
*p = 0;
*(reinterpret_cast<int*>(*node)) = 1;
}
std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
if(node == _last - 1)
std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
else
std::fread(*node + sizeof(int), buf_size, 1, hfile);
std::size_t read_size = 0;
int read_pos = std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
if(0 == read_pos && node == _last - 1)
read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
else
read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
#ifndef BOOST_NO_EXCEPTIONS
if((read_size == 0) || (std::ferror(hfile)))
{
throw std::runtime_error("Unable to read file.");
}
#else
BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
#endif
}
else
{