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

Comparing trunk/Zoe.hpp (file contents):
Revision 36 by douglas, 2004-07-22T01:19:40-07:00 vs.
Revision 38 by douglas, 2004-07-22T22:42:40-07:00

# Line 36 | Line 36 | using std::cerr;
36   #include <menes-xml/parse.hpp>
37   #include <menes-xml/textwriter.hpp>
38  
39 enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden,
40        black = 30, red, green, yellow, blue, magenta, cyan, white,
41        _black = 40, _red, _green, _yellow, _blue, _magenta, _cyan, _white };
42
43 inline std::ostream& operator<<(std::ostream& sout, Color color)
44 {
45        return sout << "\033[" << unsigned(color) << 'm';
46 }
47
39   #include "Buddy.hpp"
40  
41   struct Database { ext::String driver, host, user, password, db; };
# Line 60 | Line 51 | private:
51   public:
52          Zoe();
53          enum Generator { all, agent, url, version };
54 <        static bool debug, collector, publisher;
54 >        static bool debug, collector, publisher, color;
55          static ext::String program, config;
56          static ext::String generator(Generator generator = all);
57   };
58  
59 + enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden,
60 +        black = 30, red, green, yellow, blue, magenta, cyan, white,
61 +        _black = 40, _red, _green, _yellow, _blue, _magenta, _cyan, _white };
62 +
63 + inline std::ostream& operator<<(std::ostream& sout, Color color)
64 + {
65 +        return Zoe::color ? sout << "\033[" << unsigned(color) << 'm' : sout;
66 + }
67 +
68   #endif // _Zoe_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines