Commit Graph

19 Commits

Author SHA1 Message Date
Kevin Ballard
7d8a0fdb7d Give term.fg() and term.bg() a bool return value 2013-07-14 14:37:29 -07:00
Niko Matsakis
979d3a54f9 Correct merge failures 2013-07-08 13:55:11 -04:00
Huon Wilson
c437a16c5d rustc: add a lint to enforce uppercase statics. 2013-07-01 17:52:57 +10:00
Corey Richardson
1662bd371c Great renaming: propagate throughout the rest of the codebase 2013-06-29 11:20:02 -04:00
Kevin Ballard
ee7307e6cb Smarter warning in extra::term::Terminal.reset()
Don't spew a warn!() in reset() if num_colors is 0, because
non-color-supporting terminals are legit. Use debug!() there instead.
Continue spewing warn!() if we believe the terminal to support colors.

Use a better warning when the `op` capability can't be found.
2013-06-29 01:02:07 -04:00
Kevin Ballard
d9fed2b06f Teach extra::term::Terminal.reset() to handle missing op
Unlike fg() and bg(), we haven't already checked for the presence of
"op" in the terminfo when we call reset(), so we need to handle the case
where it's missing.

Also update the warn!() lines to avoid double-quoting the output.

Fixes #7431.
2013-06-27 14:32:33 -07:00
Kevin Ballard
0ae203a779 Refactor extra::term a bit
Move all the colors into a nested mod named color instead of prefixing
with "color_".

Define a new type color::Color, and make this a u16 instead of a u8 (to
allow for easy comparisons against num_colors, which is a u16).

Remove color_supported and replace it with num_colors.

Teach fg() and bg() to "dim" bright colors down to the normal intensity
if num_colors isn't high enough.

Remove unnecessary copies, and fix a bug where a terminfo parse failure
would try to use the wrong error and end up failing.
2013-06-26 18:07:17 -04:00
Alex Crichton
c109bed15b Deny common lints by default for lib{std,extra} 2013-06-25 17:39:43 -07:00
Kevin Ballard
da4e614742 Fix line lengths in terminfo 2013-06-14 13:03:42 -07:00
Kevin Ballard
c9e234a1ae Tweak terminfo::parm::expand function signature
Take a new struct Variables instead of two &mut [] vectors for static
and dynamic variables.
2013-06-14 12:37:53 -07:00
Patrick Walton
16086ecff7 libsyntax: Remove pub impl from the language 2013-06-04 21:45:42 -07:00
Corey Richardson
11f31b9684 Fix formatting for tidy 2013-05-31 20:02:56 -04:00
Corey Richardson
5311d59023 extra::term: better error handling and win32 compat 2013-05-31 20:02:49 -04:00
Corey Richardson
100ee84097 Only output colors if colors are supported (removes burden from caller) 2013-05-31 20:02:49 -04:00
Corey Richardson
7281166961 Use find_equiv in term 2013-05-31 20:02:49 -04:00
Corey Richardson
cf64324e19 extra::term overhaul 2013-05-31 20:02:49 -04:00
Alex Crichton
395685079a libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
Patrick Walton
f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
Patrick Walton
0c820d4123 libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
This only changes the directory names; it does not change the "real"
metadata names.
2013-05-22 21:57:05 -07:00