Break out default pbytes argument to read and get_view routines,

adding new routines.
This commit is contained in:
Ian Lance Taylor
2007-09-25 00:27:29 +00:00
parent 5f67a19ce6
commit ba45d2478b
6 changed files with 69 additions and 26 deletions

View File

@ -305,7 +305,7 @@ Lex::read_file(std::string* contents)
unsigned char buf[BUFSIZ];
do
{
this->input_file_->file().read(off, sizeof buf, buf, &got);
this->input_file_->file().read_up_to(off, sizeof buf, buf, &got);
contents->append(reinterpret_cast<char*>(&buf[0]), got);
off += got;
}