summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-02-03 15:53:56 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-02-03 15:53:56 +0300
commit8d4981fcc1c545396df3eac87a3c1a67f3d30038 (patch)
tree0e4f373313f7b251847fecd1186786574e8d450c /examples
parent3032869b86efa52f20ad9840381a37017980f587 (diff)
downloadtexo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.tar
texo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.tar.xz
texo-8d4981fcc1c545396df3eac87a3c1a67f3d30038.zip
[texo] Abolished dependency on ScriptPP.
Diffstat (limited to 'examples')
-rw-r--r--examples/lines.cpp17
-rw-r--r--examples/markdown.cpp17
-rw-r--r--examples/plain.cpp17
3 files changed, 27 insertions, 24 deletions
diff --git a/examples/lines.cpp b/examples/lines.cpp
index 96da19a..1a01909 100644
--- a/examples/lines.cpp
+++ b/examples/lines.cpp
@@ -9,10 +9,10 @@
void plain()
{
fputs(" ---- Lines to Plain ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerPlain producer(exporter);
TexoImporterLines importer(producer);
- FILE * file = fopen("lines.txt", "r");
+ FILE *file = fopen("lines.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -21,10 +21,10 @@ void plain()
void html()
{
fputs("\n ---- Lines to HTML ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerHTML producer(exporter);
TexoImporterLines importer(producer);
- FILE * file = fopen("lines.txt", "r");
+ FILE *file = fopen("lines.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -33,10 +33,10 @@ void html()
void markdown()
{
fputs("\n ---- Lines to Markdown ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerMarkdown producer(exporter);
TexoImporterLines importer(producer);
- FILE * file = fopen("lines.txt", "r");
+ FILE *file = fopen("lines.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -45,15 +45,16 @@ void markdown()
void lines()
{
fputs("\n ---- Lines to Lines ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerLines producer(exporter);
TexoImporterLines importer(producer);
- FILE * file = fopen("lines.txt", "r");
+ FILE *file = fopen("lines.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
}
+
int main()
{
plain();
diff --git a/examples/markdown.cpp b/examples/markdown.cpp
index 75a32ca..648d529 100644
--- a/examples/markdown.cpp
+++ b/examples/markdown.cpp
@@ -9,10 +9,10 @@
void plain()
{
fputs(" ---- Markdown to Plain ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerPlain producer(exporter);
TexoImporterMarkdown importer(producer);
- FILE * file = fopen("markdown.md", "r");
+ FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -21,10 +21,10 @@ void plain()
void html()
{
fputs("\n ---- Markdown to HTML ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerHTML producer(exporter);
TexoImporterMarkdown importer(producer);
- FILE * file = fopen("markdown.md", "r");
+ FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -33,10 +33,10 @@ void html()
void markdown()
{
fputs("\n ---- Markdown to Markdown ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerMarkdown producer(exporter);
TexoImporterMarkdown importer(producer);
- FILE * file = fopen("markdown.md", "r");
+ FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -45,15 +45,16 @@ void markdown()
void lines()
{
fputs("\n ---- Markdown to Lines ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerLines producer(exporter);
TexoImporterMarkdown importer(producer);
- FILE * file = fopen("markdown.md", "r");
+ FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
}
+
int main()
{
plain();
diff --git a/examples/plain.cpp b/examples/plain.cpp
index 71648cc..b64c4b1 100644
--- a/examples/plain.cpp
+++ b/examples/plain.cpp
@@ -9,10 +9,10 @@
void plain()
{
fputs(" ---- Plain to Plain ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerPlain producer(exporter);
TexoImporterPlain importer(producer);
- FILE * file = fopen("plain.txt", "r");
+ FILE *file = fopen("plain.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -21,10 +21,10 @@ void plain()
void html()
{
fputs("\n ---- Plain to HTML ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerHTML producer(exporter);
TexoImporterPlain importer(producer);
- FILE * file = fopen("plain.txt", "r");
+ FILE *file = fopen("plain.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -33,10 +33,10 @@ void html()
void markdown()
{
fputs("\n ---- Plain to Markdown ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerMarkdown producer(exporter);
TexoImporterPlain importer(producer);
- FILE * file = fopen("plain.txt", "r");
+ FILE *file = fopen("plain.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
@@ -45,15 +45,16 @@ void markdown()
void lines()
{
fputs("\n ---- Plain to Lines ----\n", stdout);
- TexoExporterFile exporter(stdout);
+ TexoFile exporter(stdout);
TexoProducerLines producer(exporter);
TexoImporterPlain importer(producer);
- FILE * file = fopen("plain.txt", "r");
+ FILE *file = fopen("plain.txt", "r");
importer.Put(file);
importer.End();
fclose(file);
}
+
int main()
{
plain();