ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/URL.cpp
(Generate patch)

Comparing trunk/Search/URL.cpp (file contents):
Revision 364 by Douglas Thrift, 2004-08-19T20:09:52-07:00 vs.
Revision 365 by douglas, 2008-08-11T15:16:35-07:00

# Line 92 | Line 92 | void URL::setURL(const string& url)
92                  exit(1);
93          }
94  
95 <        unsigned begin(7);
95 >        size_t begin(7);
96  
97   #else
98          tls = false;
# Line 108 | Line 108 | void URL::setURL(const string& url)
108                  exit(1);
109          }
110  
111 <        unsigned begin(tls ? 8 : 7);
111 >        size_t begin(tls ? 8 : 7);
112   #endif
113  
114 <        unsigned colon(url.find(':', begin)), end(url.find('/', begin));
114 >        size_t colon(url.find(':', begin)), end(url.find('/', begin));
115  
116          if (colon != string::npos && colon < end)
117          {
# Line 166 | Line 166 | string getLink(string link, URL& url)
166  
167          if (link.find('#') != string::npos)
168          {
169 <                unsigned pound(link.find('#'));
169 >                size_t pound(link.find('#'));
170  
171                  link.erase(pound);
172          }
# Line 206 | Line 206 | string getLink(string link, URL& url)
206                  hyperlink = url.getURL();
207  
208   #ifndef _OpenSSL_
209 <                unsigned path(hyperlink.find('/', 7));
209 >                size_t path(hyperlink.find('/', 7));
210   #else
211 <                unsigned path(hyperlink.find('/', url.getTls() ? 8 : 7));
211 >                size_t path(hyperlink.find('/', url.getTls() ? 8 : 7));
212   #endif
213  
214                  hyperlink.erase(path);
# Line 224 | Line 224 | string getLink(string link, URL& url)
224                  hyperlink = url.getURL();
225  
226                  string path(url.getPath());
227 <                unsigned cutoff(hyperlink.rfind(path));
227 >                size_t cutoff(hyperlink.rfind(path));
228  
229                  hyperlink.erase(cutoff);
230  
231 <                unsigned dir(path.rfind('/') + 1);
231 >                size_t dir(path.rfind('/') + 1);
232  
233                  path.erase(dir);
234  
235                  while (link.find("../") == 0)
236                  {
237 <                        unsigned dot(path.rfind('/') - 1), up(path.rfind('/', dot) + 1);
237 >                        size_t dot(path.rfind('/') - 1), up(path.rfind('/', dot) + 1);
238  
239                          path.erase(up);
240                          link.erase(0, 3);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines