summaryrefslogtreecommitdiff
path: root/klm/util/file_piece.hh
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2013-01-23 21:46:03 +0000
committerKenneth Heafield <github@kheafield.com>2013-01-23 21:46:03 +0000
commitabf044fb2e5dcea5ba4dd54ca16c4e75e1c1295b (patch)
treea53c0e2b8b9b4efd8f2ea5adf7ba954728b59b4d /klm/util/file_piece.hh
parentf55fad62d0dbad7d527a274ef74f24dae95926c9 (diff)
Completely untested Raw read call
Diffstat (limited to 'klm/util/file_piece.hh')
-rw-r--r--klm/util/file_piece.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/klm/util/file_piece.hh b/klm/util/file_piece.hh
index c07c6011..1b110287 100644
--- a/klm/util/file_piece.hh
+++ b/klm/util/file_piece.hh
@@ -64,7 +64,10 @@ class FilePiece {
long int ReadLong();
unsigned long int ReadULong();
- // Skip spaces defined by isspace.
+ // Fake read() function. Reads up to limit bytes, returning the amount read. Returns 0 on EOF || limit == 0.
+ std::size_t Raw(void *to, std::size_t limit);
+
+ // Skip spaces defined by being in delim.
void SkipSpaces(const bool *delim = kSpaces) {
for (; ; ++position_) {
if (position_ == position_end_) Shift();