mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:38:12 +00:00
Add TIOCGWINSZ ioctl so userland can determine terminal geometry.
(Don't) use this to implement short-form output in ls. I'm too tired to make a nice column formatting algorithm. I just wanted something concise when I type "ls".
This commit is contained in:
parent
f5a83c4d8a
commit
ac7a60225e
11 changed files with 208 additions and 63 deletions
|
@ -5,6 +5,11 @@
|
|||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
};
|
||||
|
||||
int ioctl(int fd, unsigned request, ...);
|
||||
|
||||
__END_DECLS
|
||||
|
|
|
@ -7,5 +7,6 @@ enum IOCtlNumber {
|
|||
TCSETS,
|
||||
TCSETSW,
|
||||
TCSETSF,
|
||||
TIOCGWINSZ,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue