blob: 13d14d33538ae90658fd712f3eaaadf85c6f2f15 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
extern mod term;
use core::io::{ReaderUtil,WriterUtil};
fn loop_chars () {
loop {
let ch = io::stdin().read_char();
io::stdout().write_char(ch);
if ch == 'q' {
break;
}
}
}
fn main () {
{
let preserve = term::ios::PreserveTermios();
term::ios::raw();
loop_chars();
}
loop_chars();
}
|