blob: c387260b9ec2dcd08abc5570e8c2241649c35fc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
extern mod term;
fn main () {
match io::stdout().get_type() {
io::Screen => {
let (cols, rows) = term::size();
println(fmt!("tty: %d %d", cols as int, rows as int));
}
io::File => {
println("not tty");
}
}
}
|