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

Comparing Smersh/Smersh.hpp (file contents):
Revision 170 by Douglas Thrift, 2004-06-19T21:57:10-07:00 vs.
Revision 173 by Douglas Thrift, 2004-06-21T03:15:47-07:00

# Line 23 | Line 23
23  
24   using namespace std;
25  
26 inline string sgetenv(const string& name)
27 {
28        char* value = getenv(name.c_str());
29
30        return value != NULL ? value : "";
31 }
32
33 inline int ssetenv(const string& name, const string& value, bool write = true)
34 {
35        return setenv(name.c_str(), value.c_str(), write);
36 }
37
38 inline int sputenv(const string& env)
39 {
40        istringstream input(env);
41        string name, value;
42
43        getline(input, name, '=');
44        getline(input, value);
45
46        return ssetenv(name, value);
47 }
48
49 inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }
50
26   extern string program;
27   extern bool debug;
28  
29 + #include "Environment.hpp"
30 +
31   class Person;
32  
33   class Smersh
34   {
35   private:
36 +        static Environment env;
37          multimap<string, string> cgi;
38 <        void parse(istream& sin);
38 >        void parse(istream& sin, Environment env);
39          void smersh(ostream& sout);
40          void output(ostream& sout, const vector<Person>& people);
41   public:
42 <        Smersh(istream& sin = cin, ostream& sout = cout);
42 >        Smersh(istream& sin = cin, ostream& sout = cout, Environment env = env);
43          ~Smersh() {}
44   };
45  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines