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

Comparing GoogleTron/GoogleTron.cpp (file contents):
Revision 707 by douglas, 2006-03-18T23:54:29-08:00 vs.
Revision 715 by douglas, 2006-03-27T02:07:13-08:00

# Line 17 | Line 17
17   #include "Sleep.hpp"
18   #include "Zlib/GzipWriter.hpp"
19  
20 int Usage()
21 {
22        api::Cout << _B("Usage: ") << api::GetExecutablePath().GetName() << _B(" [-sitemap=.+] -base=.+ [-fs=.*] [-blog=.*] [-wiki=.*] [...]") << ios::NewLine;
23
24        return 1;
25 }
26
20   int Main(const app::Options &options)
21   {
22          cse::String sitemap(_B("sitemap.gz")), base;
# Line 46 | Line 39 | int Main(const app::Options &options)
39                  else if (match = wiki(*arg))
40                          commands.InsertLast(new _H<WikiCommand>(match[1]));
41                  else
42 <                        return Usage();
42 >                        goto usage;
43          }
44  
45          if (base.IsEmpty() || commands.IsEmpty())
46 <                return Usage();
46 >        {
47 > usage:  api::Cout << _B("Usage: ") << api::GetExecutablePath().GetName() << _B(" [-sitemap=.+] -base=.+ [-fs=.*] [-blog=.*] [-wiki=.*] [...]") << ios::NewLine;
48 >
49 >                return 1;
50 >        }
51  
52          GoogleTron tron(sitemap, base, commands);
53  
# Line 127 | Line 124 | int GoogleTron::Output()
124                                                          writer.OutputText(url.GetPriority());
125                                                  }
126  
127 +                                                api::Cout << _B("Url: ") << url.GetLocation() << ios::NewLine << _B("     ") << url.GetModified() << _B(" ") << url.GetFrequency() << _B(" ") << url.GetPriority() << ios::NewLine;
128 +
129                                                  queue.Pop();
130                                          }
131                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines