aboutsummaryrefslogtreecommitdiffstats
path: root/test/termios3.rs
blob: 9e24979c2afb943b350c7e0b4cdcc7d033ee6d09 (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();
        println(fmt!("tty: %d %d", cols as int, rows as int));
    }
    else {
        println("not tty");
    }
}