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

Comparing HostStatus/HostStatus.hpp (file contents):
Revision 35 by Douglas Thrift, 2003-11-15T01:40:10-08:00 vs.
Revision 44 by Douglas Thrift, 2003-11-17T11:05:37-08:00

# Line 13 | Line 13
13   #include <string>
14   #include <sstream>
15   #include <list>
16 + #include <set>
17   #include <map>
18   #include <cstdlib>
19   #include <ctime>
# Line 34 | Line 35 | inline int sputenv(const string& name)
35          char* value = new char[name.size() + 1];
36  
37          sprintf(value, name.c_str());
38 <        
38 >
39          int code = putenv(value);
40  
41          return code;
# Line 42 | Line 43 | inline int sputenv(const string& name)
43  
44   inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }
45  
46 + #ifdef __CYGWIN__
47 +
48 + inline time_t timegm(struct tm* time)
49 + {
50 +        string zone = sgetenv("TZ");
51 +
52 +        sputenv("TZ=");
53 +        tzset();
54 +
55 +        time_t when = mktime(time);
56 +
57 +        sputenv("TZ=" + zone);
58 +        tzset();
59 +
60 +        return when;
61 + }
62 +
63 + #endif
64 +
65   class HostStatus
66   {
67   private:
68          multimap<string, string> cgi;
69          bool page;
70 +        bool host;
71 +        bool name;
72 +        bool address;
73 +        bool platform;
74 +        bool since;
75          void parse(const string& method);
76 +        void mode();
77          void display(const string& method);
78 <        void header();
78 >        void header(const string& method);
79          void footer();
80   public:
81          HostStatus();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines