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 167 by Douglas Thrift, 2004-06-19T03:02:57-07:00 vs.
Revision 168 by Douglas Thrift, 2004-06-19T03:46:12-07:00

# Line 13 | Line 13
13   #include <vector>
14   #include <map>
15   #include <algorithm>
16 + #include <cstdlib>
17   #include <cctype>
18  
18 using namespace std;
19
19   #include <menes-ext/casts.hpp>
20  
21 + using namespace std;
22 +
23   inline string sgetenv(const string& name)
24   {
25          char* value = getenv(name.c_str());
# Line 26 | Line 27 | inline string sgetenv(const string& name
27          return value != NULL ? value : "";
28   }
29  
30 + inline int ssetenv(const string& name, const string& value, bool write = true)
31 + {
32 +        return setenv(name.c_str(), value.c_str(), write);
33 + }
34 +
35   inline int sputenv(const string& env)
36   {
37          istringstream input(env);
# Line 34 | Line 40 | inline int sputenv(const string& env)
40          getline(input, name, '=');
41          getline(input, value);
42  
43 <        return setenv(name.c_str(), value.c_str(), true);
43 >        return ssetenv(name, value);
44   }
45  
46   inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines