summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-15 22:40:52 +0200
committerCarl Hetherington <cth@carlh.net>2022-05-05 21:46:30 +0200
commit57ee229993937dee8e12df4f60dd1e508fe50622 (patch)
tree195a1d27a9cfc000456beb8edc65f3c09a391ea1 /src/file.cc
parent85207b59bd065b5fd8d1c7c0302e153dcd941554 (diff)
Add ::puts().
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc8
1 files changed, 8 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;