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 21 by douglas, 2004-07-16T23:37:41-07:00 vs.
Revision 25 by douglas, 2004-07-17T16:29:02-07:00

# Line 15 | Line 15
15   extern "C"
16   {
17   #include <pwd.h>
18 + #include <sys/utsname.h>
19   #include <unistd.h>
20   }
21  
21 enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden,
22        black = 30, red, green, yellow, blue, magenta, cyan, white, _black = 40,
23        _red, _green, _yellow, _blue, _magenta, _cyan, _white };
24
25 inline std::ostream& operator<<(std::ostream& sout, Color color)
26 {
27        sout << "\033[" << unsigned(color) << 'm';
28
29        return sout;
30 }
31
22   int main(int argc, char* argv[])
23   {
24          Zoe::program = argv[0];
# Line 83 | Line 73 | Zoe::Zoe()
73   bool Zoe::debug(false), Zoe::collector(false), Zoe::publisher(false);
74   ext::String Zoe::program, Zoe::config("zoe.xml");
75  
76 + ext::String Zoe::generator()
77 + {
78 +        utsname system;
79 +
80 +        uname(&system);
81 +
82 +        return ext::String("Zoe/0.9 (") + system.sysname + "; http://computers.doug"
83 +                + "lasthrift.net/zoe.xml)";
84 + }
85 +
86   void Zoe::configure()
87   {
88          if (debug) cerr << "config = " << config << '\n';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines