6 |
|
|
7 |
|
#include "Environment.hpp" |
8 |
|
#include "Matcher.hpp" |
9 |
+ |
#include "Jargon.hpp" |
10 |
|
|
11 |
|
extern "C" |
12 |
|
{ |
55 |
|
::FTS* traversal(::fts_open(path, FTS_LOGICAL, NULL)); |
56 |
|
Matcher matcher('^' + this->path + "/(" + this->matcher + ")$"); |
57 |
|
|
58 |
+ |
if (traversal == NULL) |
59 |
+ |
{ |
60 |
+ |
cerr << "FeepingCreaturism: Horrible Failure!\n"; |
61 |
+ |
|
62 |
+ |
std::exit(1); |
63 |
+ |
} |
64 |
+ |
|
65 |
|
for (::FTSENT* entity(::fts_read(traversal)); entity != NULL; |
66 |
|
entity = ::fts_read(traversal)) |
67 |
|
{ |
106 |
|
{ |
107 |
|
if (!validate || jargon.find(selection) != jargon.end()) |
108 |
|
{ |
109 |
< |
cout << "Content-Type: text/html; charset=UTF-8\r\n\r\n" << selection |
110 |
< |
<< "\r\n"; |
109 |
> |
cout << "Content-Type: text/html; charset=UTF-8\r\n\r\n"; |
110 |
> |
|
111 |
> |
Jargon jargon(path + '/' + selection); |
112 |
> |
|
113 |
> |
cout << jargon; |
114 |
|
} |
115 |
|
else |
116 |
|
{ |