aboutsummaryrefslogtreecommitdiffstats
path: root/test/termios3.rs
blob: 30f2e6b7451484d35bf9fe6a0c1a5dabcded7651 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
extern mod term;

fn main () {
    if term::isatty() {
        let (cols, rows) = term::size();
        io::println(fmt!("tty: %d %d", cols as int, rows as int));
    }
    else {
        io::println("not tty");
    }
}