diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-03-20 21:33:19 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-03-20 21:33:19 -0500 |
commit | d00c8ec76c498196be8bfe2d58f27697bda9de69 (patch) | |
tree | c3126e111332355683d533d7741afbaca7f36cd4 /test/rl.rs | |
parent | 8fc473d033a4c38f7c0024bd259ff54b9867d50d (diff) | |
download | rust-term-d00c8ec76c498196be8bfe2d58f27697bda9de69.tar.gz rust-term-d00c8ec76c498196be8bfe2d58f27697bda9de69.zip |
start working on a terminfo wrapper
Diffstat (limited to 'test/rl.rs')
-rw-r--r-- | test/rl.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rl.rs b/test/rl.rs new file mode 100644 index 0000000..2ea664f --- /dev/null +++ b/test/rl.rs @@ -0,0 +1,18 @@ +extern mod term; +use core::io::ReaderUtil; + +fn main () { + term::info::init(); + let (rows, cols) = term::ios::size(); + do term::ios::preserve { + term::ios::cbreak(); + do term::info::with_alternate_screen { + term::info::clear(); + for uint::range(0, rows) |i| { + term::info::move(0, i); + io::print(str::repeat(".", cols)); + } + io::stdin().read_char(); + } + } +} |