Rename std::termivec to std::term

This commit is contained in:
Brian Anderson 2011-08-11 22:55:08 -07:00
parent 495b0bf65e
commit 674fb0911c
4 changed files with 13 additions and 13 deletions

View File

@ -1,7 +1,7 @@
import std::ivec; import std::ivec;
import std::uint; import std::uint;
import std::str; import std::str;
import std::termivec; import std::term;
import std::io; import std::io;
import std::option; import std::option;
import std::option::some; import std::option::some;
@ -85,12 +85,12 @@ fn emit_diagnostic(sp: &option::t[span], msg: &str, kind: &str, color: u8,
none. { } none. { }
} }
io::stdout().write_str(ss + ": "); io::stdout().write_str(ss + ": ");
if termivec::color_supported() { if term::color_supported() {
termivec::fg(io::stdout().get_buf_writer(), color); term::fg(io::stdout().get_buf_writer(), color);
} }
io::stdout().write_str(#fmt("%s:", kind)); io::stdout().write_str(#fmt("%s:", kind));
if termivec::color_supported() { if term::color_supported() {
termivec::reset(io::stdout().get_buf_writer()); term::reset(io::stdout().get_buf_writer());
} }
io::stdout().write_str(#fmt(" %s\n", msg)); io::stdout().write_str(#fmt(" %s\n", msg));

View File

@ -93,7 +93,7 @@ mod ptr;
mod test; mod test;
mod unsafe; mod unsafe;
mod ebmlivec = "ebml.rs"; mod ebmlivec = "ebml.rs";
mod termivec; mod term;
// Local Variables: // Local Variables:
// mode: rust; // mode: rust;

View File

@ -181,25 +181,25 @@ fn run_tests_console_(opts: &test_opts, tests: &[test_desc],
ret success; ret success;
fn write_ok(out: &io::writer, use_color: bool) { fn write_ok(out: &io::writer, use_color: bool) {
write_pretty(out, "ok", termivec::color_green, use_color); write_pretty(out, "ok", term::color_green, use_color);
} }
fn write_failed(out: &io::writer, use_color: bool) { fn write_failed(out: &io::writer, use_color: bool) {
write_pretty(out, "FAILED", termivec::color_red, use_color); write_pretty(out, "FAILED", term::color_red, use_color);
} }
fn write_ignored(out: &io::writer, use_color: bool) { fn write_ignored(out: &io::writer, use_color: bool) {
write_pretty(out, "ignored", termivec::color_yellow, use_color); write_pretty(out, "ignored", term::color_yellow, use_color);
} }
fn write_pretty(out: &io::writer, word: &str, color: u8, fn write_pretty(out: &io::writer, word: &str, color: u8,
use_color: bool) { use_color: bool) {
if use_color && termivec::color_supported() { if use_color && term::color_supported() {
termivec::fg(out.get_buf_writer(), color); term::fg(out.get_buf_writer(), color);
} }
out.write_str(word); out.write_str(word);
if use_color && termivec::color_supported() { if use_color && term::color_supported() {
termivec::reset(out.get_buf_writer()); term::reset(out.get_buf_writer());
} }
} }
} }