| 3977 | void activate(ColorMode::type mode, FILE* fp) { activate(mode, fileno(fp)); } |
| 3978 | |
| 3979 | void set_color(Color::type ccode) |
| 3980 | { |
| 3981 | if (!_enabled) |
| 3982 | return; |
| 3983 | |
| 3984 | // I assume that the terminal can handle basic colors. Seriously I |
| 3985 | // don't want to deal with all the termcap shit. |
| 3986 | _os << "\033[" << static_cast<int>(ccode) << "m"; |
| 3987 | _reset = (ccode != Color::reset); |
| 3988 | } |
| 3989 | |
| 3990 | ~Colorize() |
| 3991 | { |