Implement winsize()
for {ios,dragonfly}
`sys/ttycom.h` in both: `#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */`
This commit is contained in:
parent
0b01a9bb4b
commit
04c947c13a
@ -23,6 +23,8 @@ pub struct TTY {
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "bitrig",
|
||||
target_os = "openbsd"))]
|
||||
@ -54,12 +56,6 @@ pub fn set_raw(&mut self, _raw: bool) -> IoResult<()> {
|
||||
Err(sys_common::unimpl())
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux",
|
||||
target_os = "android",
|
||||
target_os = "macos",
|
||||
target_os = "freebsd",
|
||||
target_os = "bitrig",
|
||||
target_os = "openbsd"))]
|
||||
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
|
||||
unsafe {
|
||||
#[repr(C)]
|
||||
@ -82,10 +78,4 @@ struct winsize {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "ios",
|
||||
target_os = "dragonfly"))]
|
||||
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
|
||||
Err(sys_common::unimpl())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user