LibC: Define winsize in both termios.h and sys/ioctl.h
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef _BITS_TYPES_WINSIZE_H
|
||||||
|
#define _BITS_TYPES_WINSIZE_H 1
|
||||||
|
|
||||||
|
// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
struct winsize
|
||||||
|
{
|
||||||
|
unsigned short ws_row;
|
||||||
|
unsigned short ws_col;
|
||||||
|
unsigned short ws_xpixel; /* unused by kernel */
|
||||||
|
unsigned short ws_ypixel; /* unused by kernel */
|
||||||
|
};
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -7,6 +7,8 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <bits/types/winsize.h>
|
||||||
|
|
||||||
#define I_ATMARK 1
|
#define I_ATMARK 1
|
||||||
#define I_CANPUT 2
|
#define I_CANPUT 2
|
||||||
#define I_CKBAND 3
|
#define I_CKBAND 3
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ __BEGIN_DECLS
|
|||||||
#define __need_pid_t
|
#define __need_pid_t
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <bits/types/winsize.h>
|
||||||
|
|
||||||
typedef unsigned int cc_t;
|
typedef unsigned int cc_t;
|
||||||
typedef unsigned int speed_t;
|
typedef unsigned int speed_t;
|
||||||
typedef unsigned int tcflag_t;
|
typedef unsigned int tcflag_t;
|
||||||
@@ -39,14 +41,6 @@ struct termios
|
|||||||
speed_t c_ispeed;
|
speed_t c_ispeed;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct winsize
|
|
||||||
{
|
|
||||||
unsigned short ws_row;
|
|
||||||
unsigned short ws_col;
|
|
||||||
unsigned short ws_xpixel; /* unused by kernel */
|
|
||||||
unsigned short ws_ypixel; /* unused by kernel */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BRKINT 0x001
|
#define BRKINT 0x001
|
||||||
#define ICRNL 0x002
|
#define ICRNL 0x002
|
||||||
#define IGNBRK 0x004
|
#define IGNBRK 0x004
|
||||||
|
|||||||
Reference in New Issue
Block a user