@@ -57,7 +57,7 @@ pub struct Terminal {
57
57
}
58
58
59
59
#[ cfg( not( target_os = "win32" ) ) ]
60
- pub impl Terminal {
60
+ impl Terminal {
61
61
pub fn new ( out : @io:: Writer ) -> Result < Terminal , ~str > {
62
62
let term = os:: getenv ( "TERM" ) ;
63
63
if term. is_none ( ) {
@@ -81,7 +81,7 @@ pub impl Terminal {
81
81
82
82
return Ok ( Terminal { out : out, ti : inf, color_supported : cs} ) ;
83
83
}
84
- fn fg ( & self , color : u8 ) {
84
+ pub fn fg ( & self , color : u8 ) {
85
85
if self . color_supported {
86
86
let s = expand ( * self . ti . strings . find_equiv ( & ( "setaf" ) ) . unwrap ( ) ,
87
87
[ Number ( color as int ) ] , [ ] , [ ] ) ;
@@ -92,7 +92,7 @@ pub impl Terminal {
92
92
}
93
93
}
94
94
}
95
- fn bg ( & self , color : u8 ) {
95
+ pub fn bg ( & self , color : u8 ) {
96
96
if self . color_supported {
97
97
let s = expand ( * self . ti . strings . find_equiv ( & ( "setab" ) ) . unwrap ( ) ,
98
98
[ Number ( color as int ) ] , [ ] , [ ] ) ;
@@ -103,7 +103,7 @@ pub impl Terminal {
103
103
}
104
104
}
105
105
}
106
- fn reset ( & self ) {
106
+ pub fn reset ( & self ) {
107
107
if self . color_supported {
108
108
let s = expand ( * self . ti . strings . find_equiv ( & ( "op" ) ) . unwrap ( ) , [ ] , [ ] , [ ] ) ;
109
109
if s. is_ok ( ) {
@@ -116,17 +116,17 @@ pub impl Terminal {
116
116
}
117
117
118
118
#[ cfg( target_os = "win32" ) ]
119
- pub impl Terminal {
119
+ impl Terminal {
120
120
pub fn new ( out : @io:: Writer ) -> Result < Terminal , ~str > {
121
121
return Ok ( Terminal { out : out, color_supported : false } ) ;
122
122
}
123
123
124
- fn fg ( & self , color : u8 ) {
124
+ pub fn fg ( & self , color : u8 ) {
125
125
}
126
126
127
- fn bg ( & self , color : u8 ) {
127
+ pub fn bg ( & self , color : u8 ) {
128
128
}
129
129
130
- fn reset ( & self ) {
130
+ pub fn reset ( & self ) {
131
131
}
132
132
}
0 commit comments