diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-02-03 15:53:56 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-02-03 15:53:56 +0300 |
commit | 8d4981fcc1c545396df3eac87a3c1a67f3d30038 (patch) | |
tree | 0e4f373313f7b251847fecd1186786574e8d450c /src/importer.cpp | |
parent | 3032869b86efa52f20ad9840381a37017980f587 (diff) | |
download | texo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.tar texo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.tar.xz texo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.zip |
[texo] Abolished dependency on ScriptPP.
Diffstat (limited to 'src/importer.cpp')
-rw-r--r-- | src/importer.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/importer.cpp b/src/importer.cpp index bab7f8b..f46b7d2 100644 --- a/src/importer.cpp +++ b/src/importer.cpp @@ -4,7 +4,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Texo Importer */ -TexoImporter::TexoImporter(TexoProducer & producer): +TexoImporter::TexoImporter(TexoProducer &producer): producer(producer), ok(true) {} @@ -24,12 +24,12 @@ bool TexoImporter::Put(char c) return ok = ok && TruePut(c); } -bool TexoImporter::Put(const ScriptVariable & s) +bool TexoImporter::Put(const char *s) { return ok = ok && TruePut(s); } -bool TexoImporter::Put(FILE * f) +bool TexoImporter::Put(FILE *f) { return ok = ok && TruePut(f); } @@ -40,17 +40,16 @@ bool TexoImporter::TrueEnd() return producer.End(); } - -bool TexoImporter::TruePut(const ScriptVariable & str) +bool TexoImporter::TruePut(const char *str) { - const int len = str.Length(); - for (int i = 0; ok && i < len; ++i) { - ok = TruePut(str[i]); + while (*str) { + ok = TruePut(*str); + ++str; } return ok; } -bool TexoImporter::TruePut(FILE * file) +bool TexoImporter::TruePut(FILE *file) { if (file) { for (int c = fgetc(file); ok && c != EOF; c = fgetc(file)) { |