mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
libroot: add tcgetwinsize() and tcsetwinsize() for POSIX.1/2024
Change-Id: I46c0b7b5b9c8e7c74278a6e10e9b83142db21d94 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8520 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
7a4e12b7b8
commit
7190c0f117
@ -234,6 +234,8 @@ extern int tcflow(int fd, int action);
|
||||
extern int tcflush(int fd, int queueSelector);
|
||||
extern pid_t tcgetsid(int fd);
|
||||
extern int tcsetsid(int fd, pid_t pid);
|
||||
extern int tcgetwinsize(int fd, struct winsize* winsize);
|
||||
extern int tcsetwinsize(int fd, const struct winsize* winsize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -194,3 +194,16 @@ tcsetsid(int fd, pid_t pid)
|
||||
return ioctl(fd, TIOCSCTTY, NULL);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
tcgetwinsize(int fd, struct winsize* winsize)
|
||||
{
|
||||
return ioctl(fd, TIOCGWINSZ, winsize, sizeof(*winsize));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
tcsetwinsize(int fd, const struct winsize* winsize)
|
||||
{
|
||||
return ioctl(fd, TIOCSWINSZ, winsize, sizeof(*winsize));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user