diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2012-03-11 21:47:38 +0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2012-03-11 21:47:38 +0400 |
commit | 175b7aaf495963a8dd08525094073db06686adf8 (patch) | |
tree | c279eee1e5a3d3d7d417ec747091e184c418b7bf /util/file.hh | |
parent | 0fc56ef7b602134b387b264c4b1ffe13e7ac40f8 (diff) |
KenLM c1dba12
- Reject NaNs
- Fix ChartState hashing (unused in Moses)
- Expose CreateOrThrow
- Minor portability improvement in getopt
Diffstat (limited to 'util/file.hh')
-rw-r--r-- | util/file.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/file.hh b/util/file.hh index 5c57e2a9f..72c8ea768 100644 --- a/util/file.hh +++ b/util/file.hh @@ -65,7 +65,10 @@ class scoped_FILE { std::FILE *file_; }; +// Open for read only. int OpenReadOrThrow(const char *name); +// Create file if it doesn't exist, truncate if it does. Opened for write. +int CreateOrThrow(const char *name); // Return value for SizeFile when it can't size properly. const uint64_t kBadSize = (uint64_t)-1; |