mirror of
git://git.musl-libc.org/musl
synced 2025-02-04 04:51:47 +00:00
4d5786544b
these have been adopted for future issue of POSIX as the outcome of Austin Group issue 1151, and are simply functions performing the roles of the historical ioctls. since struct winsize is being standardized along with them, its definition is moved to the appropriate header. there is some chance this will break source files that expect struct winsize to be defined by sys/ioctl.h without including termios.h. if this happens, further changes will be needed to have sys/ioctl.h expose it too.
57 lines
1.0 KiB
C
57 lines
1.0 KiB
C
#ifndef _TERMIOS_H
|
|
#define _TERMIOS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <features.h>
|
|
|
|
#define __NEED_pid_t
|
|
|
|
#include <bits/alltypes.h>
|
|
|
|
typedef unsigned char cc_t;
|
|
typedef unsigned int speed_t;
|
|
typedef unsigned int tcflag_t;
|
|
|
|
struct winsize {
|
|
unsigned short ws_row;
|
|
unsigned short ws_col;
|
|
unsigned short ws_xpixel;
|
|
unsigned short ws_ypixel;
|
|
};
|
|
|
|
#define NCCS 32
|
|
|
|
#include <bits/termios.h>
|
|
|
|
speed_t cfgetospeed (const struct termios *);
|
|
speed_t cfgetispeed (const struct termios *);
|
|
int cfsetospeed (struct termios *, speed_t);
|
|
int cfsetispeed (struct termios *, speed_t);
|
|
|
|
int tcgetattr (int, struct termios *);
|
|
int tcsetattr (int, int, const struct termios *);
|
|
|
|
int tcgetwinsize (int, struct winsize *);
|
|
int tcsetwinsize (int, const struct winsize *);
|
|
|
|
int tcsendbreak (int, int);
|
|
int tcdrain (int);
|
|
int tcflush (int, int);
|
|
int tcflow (int, int);
|
|
|
|
pid_t tcgetsid (int);
|
|
|
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
void cfmakeraw(struct termios *);
|
|
int cfsetspeed(struct termios *, speed_t);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|