blob: f02c324ce8547cdc6b051a14efab2f96346f3dbd (
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::ios::size();
println(fmt!("tty: %d %d", cols as int, rows as int));
}
io::File => {
println("not tty");
}
}
}
|