Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

reorganize a couple things

  • Loading branch information...
commit 660a905b7fd41f59456c166b9ce9b91461c41844 1 parent 1c75c7d
Jesse Luehrs authored

Showing 2 changed files with 16 additions and 16 deletions. Show diff stats Hide diff stats

  1. 23  src/term.rs
  2. 9  src/util.rs
23  src/term.rs
@@ -5,12 +5,17 @@
5 5
 
6 6
 #[crate_type = "lib"];
7 7
 
8  
-use core::libc::c_int;
9  
-
10 8
 pub use ios::{cooked,cbreak,raw,echo,size};
  9
+pub use util::isatty;
  10
+
11 11
 use info::{escape,escape1,escape2};
12 12
 use trie::Trie;
13 13
 
  14
+pub mod info;
  15
+pub mod ios;
  16
+mod trie;
  17
+mod util;
  18
+
14 19
 enum Keypress {
15 20
     KeyCharacter(char),
16 21
     KeyBackspace,
@@ -444,17 +449,3 @@ fn build_escapes_trie () -> ~Trie<Keypress> {
444 449
 
445 450
     trie
446 451
 }
447  
-
448  
-pub fn isatty() -> bool {
449  
-    unsafe { c_isatty(0) as bool }
450  
-}
451  
-
452  
-pub mod ios;
453  
-pub mod info;
454  
-mod util;
455  
-mod trie;
456  
-
457  
-extern {
458  
-    #[link_name = "isatty"]
459  
-    fn c_isatty(fd: c_int) -> c_int;
460  
-}
9  src/util.rs
@@ -39,3 +39,12 @@ pub fn timed_read (timeout: int) -> Option<char> {
39 39
 extern mod io_helper {
40 40
     fn timed_read (timeout: c_int) -> c_int;
41 41
 }
  42
+
  43
+pub fn isatty() -> bool {
  44
+    unsafe { c_isatty(0) as bool }
  45
+}
  46
+
  47
+extern {
  48
+    #[link_name = "isatty"]
  49
+    fn c_isatty(fd: c_int) -> c_int;
  50
+}

0 notes on commit 660a905

Please sign in to comment.
Something went wrong with that request. Please try again.