summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/file.cc8
-rw-r--r--src/file.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/file.cc b/src/file.cc
index 8ab50293..bb276d48 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -120,6 +120,14 @@ File::gets(char *s, int size)
}
+int
+File::puts(char const* s)
+{
+ DCP_ASSERT(_file);
+ return fputs(s, _file);
+}
+
+
File::operator bool() const
{
return _file != nullptr;
diff --git a/src/file.h b/src/file.h
index 037251c1..edc431bd 100644
--- a/src/file.h
+++ b/src/file.h
@@ -71,6 +71,8 @@ public:
int eof();
/** fgets() wrapper */
char *gets(char *s, int size);
+ /** fputs() wrapper */
+ int puts(char const *s);
/** fseek/fseeki64 wrapper */
int seek(int64_t offset, int whence);
/** ftell/ftelli64 wrapper */