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

Comparing trunk/Search/Search.cpp (file contents):
Revision 35 by douglas, 2003-01-16T17:27:03-08:00 vs.
Revision 56 by douglas, 2003-02-07T17:25:02-08:00

# Line 61 | Line 61
61  
62   string program;
63   string programName = "Douglas Thrift's Search Engine";
64 < string programVersion = "1.1alpha2";
64 > string programVersion = "1.1";
65   bool debug = false;
66  
67   int main(int argc, char* argv[])
# Line 84 | Line 84 | int main(int argc, char* argv[])
84          string notfound = "notfound.html";
85          string pages = "pages.html";
86  
87 +        string email;
88 +
89          for (int index = 1; index < argc; index++)
90          {
91                  string arg(argv[index]);
# Line 222 | Line 224 | int main(int argc, char* argv[])
224                                  return 1;
225                          }
226                  }
225                else if (arg == "-e")
226                {
227                        if (++index < argc)
228                        {
229                                // set from email
230                        }
231                        else
232                        {
233                                cerr << program << ": Bad arguments\n";
234                                usage();
235                                return 1;
236                        }
237                }
227                  else if (arg == "-D")
228                  {
229                          debug = true;
# Line 257 | Line 246 | int main(int argc, char* argv[])
246                  {
247                          cerr << program << ": Too many indices, can only build one index"
248                                  << " at a time\n";
249 +                        usage();
250                          return 1;
251                  }
252  
253                  if (indexDomains.size() < 1)
254                  {
255                          cerr << program << ": Must specify at least one domain\n";
256 +                        usage();
257                          return 1;
258                  }
259  
# Line 395 | Line 386 | string platform()
386  
387   void usage()
388   {
389 + #ifdef _WIN32
390 +        OSVERSIONINFO* computer = new OSVERSIONINFO;
391 +        computer->dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
392 +        GetVersionEx(computer);
393 +
394 +        string program = ::program;
395 +        if (computer->dwPlatformId != VER_PLATFORM_WIN32_NT)
396 +        {
397 +                program = "Search";
398 +        }
399 +
400 +        delete computer;
401 + #endif // _WIN32
402 +
403          string tab(8 + program.length(), ' ');
404  
405          cout << "Usage: " << program << " [index ...] [-P page] [-h header] [-b bo"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines