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

Comparing HostUpdate/Host.cpp (file contents):
Revision 15 by Douglas Thrift, 2003-11-09T16:51:42-08:00 vs.
Revision 19 by Douglas Thrift, 2003-11-10T19:46:19-08:00

# Line 6 | Line 6
6  
7   #include "Host.hpp"
8  
9 #ifndef _WIN32
10
11 static char slash = '/';
12
13 #else
14
15 static char slash = '\\';
16
17 #endif
18
9   Host::Host(const string& host, const string& name, const string& address, const
10          string& platform)
11   {
# Line 73 | Line 63 | void Host::setAddress(const string& addr
63          if (value == INADDR_NONE)
64          {
65                  cerr << "Host.setAddress(): INADDR_NONE\n";
76                exit(1);
66          }
67          else
68          {
# Line 126 | Line 115 | Host Host::operator++()
115                  getline(fin, name);
116  
117                  string address;
118 <                
118 >
119                  getline(fin, address);
120  
121                  in_addr_t value = inet_addr(address.c_str());
# Line 134 | Line 123 | Host Host::operator++()
123                  if (value == INADDR_NONE)
124                  {
125                          cerr << "Host.operator++(): INADDR_NONE\n";
137                        exit(1);
126                  }
127                  else
128                  {
# Line 160 | Line 148 | Host Host::operator++(int)
148   Host Host::operator--()
149   {
150          string file = string("hosts") + slash + host;
151 <        
151 >
152          ofstream fout(file.c_str());
153  
154          fout << name << '\n'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines