duplicate_finder/tty/mod.rs
1//! Most of the code in for the `terminal_size()` function taken from:
2//! https://github.com/eminence/terminal-size
3//!
4//! A simple utility for getting the size of a terminal, and moving `n` lines up.
5//!
6//! Supports both Linux and Windows, but help is needed to test other platforms
7//!
8//!
9
10#[derive(Debug)]
11pub struct Width(pub u16);
12#[derive(Debug)]
13pub struct Height(pub u16);
14
15#[cfg(unix)]
16mod unix;
17#[cfg(unix)]
18pub use self::unix::*;
19
20#[cfg(windows)]
21mod windows;
22#[cfg(windows)]
23pub use self::windows::*;
24
25#[cfg(target_os = "redox")]
26mod redox;
27#[cfg(target_os = "redox")]
28pub use self::redox::*;