blob: 648d529afca898cc4c79a79a0dea1cfbcb957fce (
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
62
63
64
65
66
|
#include <file.hpp>
#include <html.hpp>
#include <lines.hpp>
#include <markdown.hpp>
#include <plain.hpp>
#include <stdio.h>
void plain()
{
fputs(" ---- Markdown to Plain ----\n", stdout);
TexoFile exporter(stdout);
TexoProducerPlain producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
}
void html()
{
fputs("\n ---- Markdown to HTML ----\n", stdout);
TexoFile exporter(stdout);
TexoProducerHTML producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
}
void markdown()
{
fputs("\n ---- Markdown to Markdown ----\n", stdout);
TexoFile exporter(stdout);
TexoProducerMarkdown producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
}
void lines()
{
fputs("\n ---- Markdown to Lines ----\n", stdout);
TexoFile exporter(stdout);
TexoProducerLines producer(exporter);
TexoImporterMarkdown importer(producer);
FILE *file = fopen("markdown.md", "r");
importer.Put(file);
importer.End();
fclose(file);
}
int main()
{
plain();
html();
markdown();
lines();
return 0;
}
|