diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/terminal_size/examples | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/terminal_size/examples')
-rw-r--r-- | vendor/terminal_size/examples/get_size.rs | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/vendor/terminal_size/examples/get_size.rs b/vendor/terminal_size/examples/get_size.rs deleted file mode 100644 index 155784d..0000000 --- a/vendor/terminal_size/examples/get_size.rs +++ /dev/null @@ -1,49 +0,0 @@ -#[cfg(windows)] -fn run() { - use std::os::windows::io::RawHandle; - use winapi::um::processenv::GetStdHandle; - use winapi::um::winbase::{STD_ERROR_HANDLE, STD_INPUT_HANDLE, STD_OUTPUT_HANDLE}; - - let stdout = unsafe { GetStdHandle(STD_OUTPUT_HANDLE) } as RawHandle; - println!( - "Size from terminal_size_using_handle(stdout): {:?}", - terminal_size::terminal_size_using_handle(stdout) - ); - - let stderr = unsafe { GetStdHandle(STD_ERROR_HANDLE) } as RawHandle; - println!( - "Size from terminal_size_using_handle(stderr): {:?}", - terminal_size::terminal_size_using_handle(stderr) - ); - - let stdin = unsafe { GetStdHandle(STD_INPUT_HANDLE) } as RawHandle; - println!( - "Size from terminal_size_using_handle(stdin): {:?}", - terminal_size::terminal_size_using_handle(stdin) - ); -} - -#[cfg(not(windows))] -fn run() { - println!( - "Size from terminal_size_using_fd(stdout): {:?}", - terminal_size::terminal_size_using_fd(libc::STDOUT_FILENO) - ); - println!( - "Size from terminal_size_using_fd(stderr): {:?}", - terminal_size::terminal_size_using_fd(libc::STDERR_FILENO) - ); - println!( - "Size from terminal_size_using_fd(stdin): {:?}", - terminal_size::terminal_size_using_fd(libc::STDIN_FILENO) - ); -} - -fn main() { - println!( - "Size from terminal_size(): {:?}", - terminal_size::terminal_size() - ); - - run(); -} |