ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FeepingCreaturism/FeepingCreaturism.cpp
(Generate patch)

Comparing FeepingCreaturism/FeepingCreaturism.cpp (file contents):
Revision 195 by Douglas Thrift, 2004-08-27T15:20:14-07:00 vs.
Revision 196 by Douglas Thrift, 2004-08-27T19:31:26-07:00

# Line 6 | Line 6
6  
7   #include "Environment.hpp"
8   #include "Matcher.hpp"
9 + #include "Jargon.hpp"
10  
11   extern "C"
12   {
# Line 54 | Line 55 | void FeepingCreaturism::initialize()
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          {
# Line 98 | Line 106 | void FeepingCreaturism::select(const std
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          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines