15 |
|
#include <fts.h> |
16 |
|
} |
17 |
|
|
18 |
< |
int main(int argc, char* argv[]) |
18 |
> |
#include <menes-api/exename.hpp> |
19 |
> |
#include <menes-app/application.hpp> |
20 |
> |
|
21 |
> |
struct FeepingCreaturismCommand : public app::Application |
22 |
|
{ |
23 |
< |
FeepingCreaturism::program = argv[0]; |
23 |
> |
virtual int Run(const app::ArgumentList& args) |
24 |
> |
{ |
25 |
> |
FeepingCreaturism::program = api::GetExecutableName(); |
26 |
|
|
27 |
< |
FeepingCreaturism creaturism; |
27 |
> |
FeepingCreaturism creaturism; |
28 |
|
|
29 |
< |
return 0; |
30 |
< |
} |
29 |
> |
return 0; |
30 |
> |
} |
31 |
> |
} creaturism; |
32 |
|
|
33 |
|
FeepingCreaturism::FeepingCreaturism() |
34 |
|
{ |
79 |
|
this->path = *node/"jargon"; |
80 |
|
this->matcher = *node/"matcher"; |
81 |
|
|
82 |
< |
char* path[] = { new char[this->path.size()] }; |
82 |
> |
char* path[] = { new char[this->path.GetData().GetSize()] }; |
83 |
|
|
84 |
< |
std::strcpy(path[0], this->path.c_str()); |
84 |
> |
std::strcpy(path[0], this->path.NullTerminate()); |
85 |
|
|
86 |
|
::FTS* traversal(::fts_open(path, FTS_LOGICAL, NULL)); |
87 |
|
Matcher matcher("^" + this->path + "/(" + this->matcher + ")$"); |
177 |
|
{ |
178 |
|
api::Cout << "Content-Type: text/html; charset=UTF-8\r\n\r\n"; |
179 |
|
|
180 |
< |
Jargon jargon(path + "/" + selection, cgi.find("include") != cgi.end() |
181 |
< |
? lexical_cast<bool>(ext::String(cgi.find("include")->second)) |
182 |
< |
: false, cgi.find("relative") != cgi.end() |
183 |
< |
? cgi.find("relative")->second : ""); |
180 |
> |
Jargon jargon(path, selection, cgi.find("include") != cgi.end() |
181 |
> |
&& lexical_cast<bool>(ext::String(cgi.find("include")->second)), |
182 |
> |
cgi.find("relative") != cgi.end() |
183 |
> |
? ext::String(cgi.find("relative")->second) : ext::String()); |
184 |
|
|
185 |
|
api::Cout << jargon; |
186 |
|
} |