Permalink
Browse files

reorganize a couple things

  • Loading branch information...
doy committed Apr 2, 2013
1 parent 1c75c7d commit 660a905b7fd41f59456c166b9ce9b91461c41844
Showing with 16 additions and 16 deletions.
  1. +7 −16 src/term.rs
  2. +9 −0 src/util.rs
View
@@ -5,12 +5,17 @@
#[crate_type = "lib"];
-use core::libc::c_int;
-
pub use ios::{cooked,cbreak,raw,echo,size};
+pub use util::isatty;
+
use info::{escape,escape1,escape2};
use trie::Trie;
+pub mod info;
+pub mod ios;
+mod trie;
+mod util;
+
enum Keypress {
KeyCharacter(char),
KeyBackspace,
@@ -444,17 +449,3 @@ fn build_escapes_trie () -> ~Trie<Keypress> {
trie
}
-
-pub fn isatty() -> bool {
- unsafe { c_isatty(0) as bool }
-}
-
-pub mod ios;
-pub mod info;
-mod util;
-mod trie;
-
-extern {
- #[link_name = "isatty"]
- fn c_isatty(fd: c_int) -> c_int;
-}
View
@@ -39,3 +39,12 @@ pub fn timed_read (timeout: int) -> Option<char> {
extern mod io_helper {
fn timed_read (timeout: c_int) -> c_int;
}
+
+pub fn isatty() -> bool {
+ unsafe { c_isatty(0) as bool }
+}
+
+extern {
+ #[link_name = "isatty"]
+ fn c_isatty(fd: c_int) -> c_int;
+}

0 comments on commit 660a905

Please sign in to comment.