blob: 2fbe37f2528cc50d2ee9b88f7c6558ee73f7ea90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#include <stdio.h>
#include <html.hpp>
#include <plain.hpp>
#include <lines.hpp>
#include <markdown.hpp>
#include <file.hpp>
void plain()
{
fputs(" ---- Markdown to Plain ----\n\n", stdout);
TexoExporterFile exporter(stdout);
TexoProducerPlain producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
fclose(file);
}
void html()
{
fputs("\n\n ---- Markdown to HTML ----\n\n", stdout);
TexoExporterFile exporter(stdout);
TexoProducerHTML producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
fclose(file);
}
void markdown()
{
fputs("\n\n ---- Markdown to Markdown ----\n\n", stdout);
TexoExporterFile exporter(stdout);
TexoProducerMarkdown producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
fclose(file);
}
void lines()
{
fputs("\n\n ---- Markdown to Lines ----\n\n", stdout);
TexoExporterFile exporter(stdout);
TexoProducerLines producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
fclose(file);
}
int main()
{
plain();
html();
markdown();
lines();
return 0;
}
|