Skip to content

Commit 131d26e

Browse files
committed
---
yaml --- r: 62908 b: refs/heads/snap-stage3 c: 11f31b9 h: refs/heads/master v: v3
1 parent efd8624 commit 131d26e

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5311d590230428aa5f2473d9dc6355ed943f731d
4+
refs/heads/snap-stage3: 11f31b96848c7d04f79e6aaa2c789857bb224526
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/term.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ pub impl Terminal {
7575
}
7676

7777
let mut inf = ti.get();
78-
let cs = *inf.numbers.find_or_insert(~"colors", 0) >= 16 && inf.strings.find(&~"setaf").is_some()
78+
let cs = *inf.numbers.find_or_insert(~"colors", 0) >= 16
79+
&& inf.strings.find(&~"setaf").is_some()
7980
&& inf.strings.find_equiv(&("setab")).is_some();
8081

8182
return Ok(Terminal {out: out, ti: inf, color_supported: cs});

branches/snap-stage3/src/libextra/terminfo/parm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub enum Param {
4646
To be compatible with ncurses, `sta` and `dyn` should be the same between calls to `expand` for
4747
multiple capabilities for the same terminal.
4848
*/
49-
pub fn expand(cap: &[u8], params: &mut [Param], sta: &mut [Param], dyn: &mut [Param])
49+
pub fn expand(cap: &[u8], params: &mut [Param], sta: &mut [Param], dyn: &mut [Param])
5050
-> Result<~[u8], ~str> {
5151
assert!(cap.len() != 0, "expanding an empty capability makes no sense");
5252
assert!(params.len() <= 9, "only 9 parameters are supported by capability strings");

branches/snap-stage3/src/libextra/terminfo/parser/compiled.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
/// ncurses-compatible compiled terminfo format parsing (term(5))
212
313
use core::prelude::*;
@@ -283,11 +293,12 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
283293

284294

285295
// Find the offset of the NUL we want to go to
286-
let nulpos = vec::position_between(string_table, offset as uint, string_table_bytes as uint,
287-
|&b| b == 0);
296+
let nulpos = vec::position_between(string_table, offset as uint,
297+
string_table_bytes as uint, |&b| b == 0);
288298
match nulpos {
289299
Some(x) => {
290-
string_map.insert(name.to_owned(), string_table.slice(offset as uint, x).to_owned())
300+
string_map.insert(name.to_owned(),
301+
string_table.slice(offset as uint, x).to_owned())
291302
},
292303
None => {
293304
return Err(~"invalid file: missing NUL in string_table");
@@ -303,7 +314,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
303314
#[cfg(test)]
304315
mod test {
305316
use super::*;
306-
use p = std::path::PosixPath;
317+
use p = std::path::Path;
307318

308319
#[test]
309320
fn test_veclens() {
@@ -314,6 +325,7 @@ mod test {
314325

315326
#[test]
316327
fn test_parse() {
317-
parse(io::file_reader(&p("/usr/share/terminfo/r/rxvt-256color")).unwrap(), false);
328+
// FIXME #6870: Distribute a compiled file in src/tests and test there
329+
// parse(io::file_reader(&p("/usr/share/terminfo/r/rxvt-256color")).unwrap(), false);
318330
}
319331
}

0 commit comments

Comments
 (0)