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

Comparing trunk/Zoe.cpp (file contents):
Revision 13 by douglas, 2004-07-11T23:49:09-07:00 vs.
Revision 15 by douglas, 2004-07-13T20:14:49-07:00

# Line 8 | Line 8
8   #include "Collector.hpp"
9   #include "Publisher.hpp"
10  
11 + enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden,
12 +        black = 30, red, green, yellow, blue, magenta, cyan, white, _black = 40,
13 +        _red, _green, _yellow, _blue, _magenta, _cyan, _white };
14 +
15 + inline std::ostream& operator<<(std::ostream& sout, Color color)
16 + {
17 +        sout << "\033[" << unsigned(color) << 'm';
18 +
19 +        return sout;
20 + }
21 +
22   int main(int argc, char* argv[])
23   {
24          Zoe::program = argv[0];
# Line 35 | Line 46 | int main(int argc, char* argv[])
46                  }
47                  else
48                  {
49 <                        cerr << "Usage: " << Zoe::program << " [-config=config] [-collector"
50 <                           << "] [-publisher] [-D]\n";
49 >                        cerr << bright << "Usage: " << cyan << Zoe::program << reset << " ["
50 >                                << bright << blue <<  "-config=" << yellow << "config" << reset
51 >                                << "] [" << bright << blue << "-collector" << reset << "] ["
52 >                                << bright << blue << "-publisher" << reset << "] [" << bright
53 >                                << blue << "-D" << reset << "]\n";
54  
55                          return 1;
56                  }
# Line 51 | Line 65 | Zoe::Zoe()
65   {
66          configure();
67  
68 <        if (collector) Collector collector(buddies);
69 <        if (publisher) Publisher publisher(buddies);
68 >        Collector collector(login, password, buddies, Zoe::collector);
69 >        Publisher publisher(buddies, Zoe::publisher);
70   }
71  
72   bool Zoe::debug(false), Zoe::collector(false), Zoe::publisher(false);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines