summaryrefslogtreecommitdiff
path: root/src/file.cpp
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-11-08 19:49:40 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-11-08 19:49:40 +0300
commited7a63015c1583d5544ac18bbaccaedc95f3e5e3 (patch)
tree9648d5a74bae9cbd90670a8bfa0af47189e4536f /src/file.cpp
parentc6419eed96f2832b1de2b94d711552efaa9b172d (diff)
downloadtexo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar
texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar.xz
texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.zip
[texo] Full rewrite of inner representation.
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp
index ae41bde..221ff81 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1,15 +1,21 @@
#include "file.hpp"
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Texo File Exporter
+ */
TexoExporterFile::TexoExporterFile(FILE *file): file(file)
{}
-void TexoExporterFile::Put(char c)
+
+bool TexoExporterFile::Put(char c)
{
fputc(c, file);
+ return !ferror(file);
}
-void TexoExporterFile::Put(const ScriptVariable &str)
+bool TexoExporterFile::Put(const ScriptVariable &str)
{
fwrite(str.c_str(), 1, str.Length(), file);
+ return !ferror(file);
}