ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Smersh.hpp
Revision: 166
Committed: 2004-06-18T22:24:07-07:00 (21 years ago) by Douglas Thrift
File size: 922 byte(s)
Log Message:
... with good friends and good times ...

File Contents

# Content
1 // Smersh
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Smersh_hpp_
8 #define _Smersh_hpp_
9
10 #include <iostream>
11 #include <string>
12 #include <sstream>
13 #include <vector>
14 #include <map>
15 #include <cctype>
16
17 using namespace std;
18
19 #include <menes-ext/casts.hpp>
20
21 inline string sgetenv(const string& name)
22 {
23 char* value = getenv(name.c_str());
24
25 return value != NULL ? value : "";
26 }
27
28 inline int sputenv(const string& env)
29 {
30 istringstream input(env);
31 string name, value;
32
33 getline(input, name, '=');
34 getline(input, value);
35
36 return setenv(name.c_str(), value.c_str(), true);
37 }
38
39 inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }
40
41 class Person;
42
43 class Smersh
44 {
45 private:
46 multimap<string, string> cgi;
47 void parse(istream& sin);
48 void smersh(ostream& sout);
49 void output(ostream& sout, const vector<Person>& people);
50 public:
51 Smersh(istream& sin = cin, ostream& sout = cout);
52 ~Smersh() {}
53 };
54
55 #endif // _Smersh_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id