Kernel/LibC: Implement ioctl(TIOCGWINSZ)
This allows ncurses to get the window size!
This commit is contained in:
@@ -101,7 +101,14 @@ struct str_list
|
||||
#define I_SWROPT 28
|
||||
#define I_UNLINK 29
|
||||
|
||||
#define KD_LOADFONT 30
|
||||
#define KDLOADFONT 30
|
||||
|
||||
struct winsize
|
||||
{
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
};
|
||||
#define TIOCGWINSZ 50
|
||||
|
||||
#define FLUSHR 1
|
||||
#define FLUSHRW 2
|
||||
|
||||
@@ -20,7 +20,7 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ioctl(STDOUT_FILENO, KD_LOADFONT, argv[1]) == -1)
|
||||
if (ioctl(STDOUT_FILENO, KDLOADFONT, argv[1]) == -1)
|
||||
{
|
||||
perror("ioctl");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user