File tree Expand file tree Collapse file tree 6 files changed +121
-94
lines changed
branches/try2/src/libterm Expand file tree Collapse file tree 6 files changed +121
-94
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 93499b1eaf74a58ff7de3ac9240afc4796ef57c8
8
+ refs/heads/try2: ded860c0e89e6f33dece7f65bb71419b515314eb
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -126,10 +126,12 @@ impl<T: Writer> Terminal<T> {
126
126
/// Returns `Err()` on failure to open the terminfo database correctly.
127
127
/// Also, in the event that the individual terminfo database entry can not
128
128
/// be parsed.
129
- pub fn new ( out : T ) -> Result < Terminal < T > , ~ str > {
129
+ pub fn new ( out : T ) -> Result < Terminal < T > , StrBuf > {
130
130
let term = match os:: getenv ( "TERM" ) {
131
131
Some ( t) => t,
132
- None => return Err ( "TERM environment variable undefined" . to_owned ( ) )
132
+ None => {
133
+ return Err ( "TERM environment variable undefined" . to_strbuf ( ) )
134
+ }
133
135
} ;
134
136
135
137
let mut file = match open ( term) {
@@ -251,7 +253,8 @@ impl<T: Writer> Terminal<T> {
251
253
cap = self . ti . strings . find_equiv ( & ( "op" ) ) ;
252
254
}
253
255
}
254
- let s = cap. map_or ( Err ( "can't find terminfo capability `sgr0`" . to_owned ( ) ) , |op| {
256
+ let s = cap. map_or ( Err ( "can't find terminfo capability \
257
+ `sgr0`". to_strbuf ( ) ) , |op| {
255
258
expand ( op. as_slice ( ) , [ ] , & mut Variables :: new ( ) )
256
259
} ) ;
257
260
if s. is_ok ( ) {
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ use collections::HashMap;
15
15
/// A parsed terminfo database entry.
16
16
pub struct TermInfo {
17
17
/// Names for the terminal
18
- pub names : Vec < ~ str > ,
18
+ pub names : Vec < StrBuf > ,
19
19
/// Map of capability name to boolean value
20
- pub bools : HashMap < ~ str , bool > ,
20
+ pub bools : HashMap < StrBuf , bool > ,
21
21
/// Map of capability name to numeric value
22
- pub numbers : HashMap < ~ str , u16 > ,
22
+ pub numbers : HashMap < StrBuf , u16 > ,
23
23
/// Map of capability name to raw (unexpanded) string
24
- pub strings : HashMap < ~ str , Vec < u8 > >
24
+ pub strings : HashMap < StrBuf , Vec < u8 > >
25
25
}
26
26
27
27
pub mod searcher;
You can’t perform that action at this time.
0 commit comments