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 225 by Douglas Thrift, 2004-09-06T04:03:48-07:00 vs.
Revision 243 by Douglas Thrift, 2004-09-11T21:27:10-07:00

# Line 15 | Line 15 | extern "C"
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   {
# Line 73 | Line 79 | void FeepingCreaturism::initialize()
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 + ")$");
# Line 171 | Line 177 | void FeepingCreaturism::select(const ext
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          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines