diff --git a/mk/crates.mk b/mk/crates.mk index 7ac3c3b486b11..b447dbda9e08e 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -49,22 +49,23 @@ # automatically generated for all stage/host/target combinations. ################################################################################ -TARGET_CRATES := std extra green rustuv native flate arena glob +TARGET_CRATES := std extra green rustuv native flate arena glob term HOST_CRATES := syntax rustc rustdoc CRATES := $(TARGET_CRATES) $(HOST_CRATES) TOOLS := compiletest rustdoc rustc DEPS_std := native:rustrt -DEPS_extra := std +DEPS_extra := std term DEPS_green := std DEPS_rustuv := std native:uv native:uv_support DEPS_native := std -DEPS_syntax := std extra +DEPS_syntax := std extra term DEPS_rustc := syntax native:rustllvm flate arena DEPS_rustdoc := rustc native:sundown DEPS_flate := std native:miniz DEPS_arena := std extra DEPS_glob := std +DEPS_term := std TOOL_DEPS_compiletest := extra green rustuv TOOL_DEPS_rustdoc := rustdoc green rustuv diff --git a/src/doc/index.md b/src/doc/index.md index d3270a96d8036..730c9c744f6f6 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -40,6 +40,7 @@ li {list-style-type: none; } * [The `arena` allocation library](arena/index.html) * [The `flate` compression library](flate/index.html) * [The `glob` file path matching library](glob/index.html) +* [The `term` terminal-handling library](term/index.html) # Tooling diff --git a/src/libextra/lib.rs b/src/libextra/lib.rs index bb89915dfd135..e2a4b52c810d2 100644 --- a/src/libextra/lib.rs +++ b/src/libextra/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -67,7 +67,6 @@ pub mod ebml; pub mod getopts; pub mod json; pub mod tempfile; -pub mod term; pub mod time; pub mod base64; pub mod workcache; @@ -87,8 +86,6 @@ pub mod uuid; #[cfg(unicode)] mod unicode; -pub mod terminfo; - // Compiler support modules pub mod test; diff --git a/src/libextra/test.rs b/src/libextra/test.rs index cd04cddba4a69..ef5a05b6a3e51 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -15,6 +15,7 @@ // simplest interface possible for representing and running tests // while providing a base that other test frameworks may build off of. +extern mod term; use getopts; use getopts::groups; @@ -23,7 +24,6 @@ use json; use serialize::Decodable; use stats::Stats; use stats; -use term; use time::precise_time_ns; use treemap::TreeMap; diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index fabc244e00af8..90fe121160bae 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -16,7 +16,7 @@ use std::io; use std::io::stdio::StdWriter; use std::iter::range; use std::local_data; -use extra::term; +use term; static BUG_REPORT_URL: &'static str = "http://static.rust-lang.org/doc/master/complement-bugreport.html"; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 532a2a9a31493..e2460b0171a20 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -31,6 +31,7 @@ This API is completely unstable and subject to change. #[deny(non_camel_case_types)]; extern mod extra; +extern mod term; pub mod util { pub mod interner; diff --git a/src/libextra/term.rs b/src/libterm/lib.rs similarity index 94% rename from src/libextra/term.rs rename to src/libterm/lib.rs index ca5c4cfa85bfb..01ebf58628fa8 100644 --- a/src/libextra/term.rs +++ b/src/libterm/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -10,15 +10,26 @@ //! Simple ANSI color library -#[allow(missing_doc)]; +#[crate_id = "term#0.10-pre"]; +#[comment = "Simple ANSI color library"]; +#[license = "MIT/ASL2"]; +#[crate_type = "rlib"]; +#[crate_type = "dylib"]; +#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")]; +#[deny(non_camel_case_types)]; +#[allow(missing_doc)]; use std::os; -use terminfo::*; +use terminfo::TermInfo; use terminfo::searcher::open; use terminfo::parser::compiled::{parse, msys_terminfo}; use terminfo::parm::{expand, Number, Variables}; +pub mod terminfo; + // FIXME (#2807): Windows support. pub mod color { diff --git a/src/libextra/terminfo/mod.rs b/src/libterm/terminfo/mod.rs similarity index 92% rename from src/libextra/terminfo/mod.rs rename to src/libterm/terminfo/mod.rs index 06bf6e47c3291..439297db84e98 100644 --- a/src/libextra/terminfo/mod.rs +++ b/src/libterm/terminfo/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // diff --git a/src/libextra/terminfo/parm.rs b/src/libterm/terminfo/parm.rs similarity index 99% rename from src/libextra/terminfo/parm.rs rename to src/libterm/terminfo/parm.rs index bd9eadc078d1b..ff8855c1508ef 100644 --- a/src/libextra/terminfo/parm.rs +++ b/src/libterm/terminfo/parm.rs @@ -573,7 +573,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> { #[cfg(test)] mod test { - use super::*; + use super::{expand,String,Variables,Number}; use std::result::Ok; #[test] diff --git a/src/libextra/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs similarity index 99% rename from src/libextra/terminfo/parser/compiled.rs rename to src/libterm/terminfo/parser/compiled.rs index 23478728330eb..b0104faf4b5e6 100644 --- a/src/libextra/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -333,7 +333,8 @@ pub fn msys_terminfo() -> ~TermInfo { #[cfg(test)] mod test { - use super::*; + + use super::{boolnames, boolfnames, numnames, numfnames, stringnames, stringfnames}; #[test] fn test_veclens() { diff --git a/src/libextra/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs similarity index 100% rename from src/libextra/terminfo/searcher.rs rename to src/libterm/terminfo/searcher.rs