From 8d4981fcc1c545396df3eac87a3c1a67f3d30038 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Mon, 3 Feb 2020 15:53:56 +0300 Subject: [texo] Abolished dependency on ScriptPP. --- src/importer.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/importer.cpp') 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)) { -- cgit v1.2.3