diff options
author | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
commit | 294b585994da4427ac98a8353ff41aed5f301d54 (patch) | |
tree | aafcd885c1fe28819ef1a511da5e6344411b5597 /include/musl/termios.h | |
parent | f0958551b43959174d28b2056f584d2081494e6c (diff) | |
download | engine33-294b585994da4427ac98a8353ff41aed5f301d54.tar.gz |
Import and fix old code
Diffstat (limited to 'include/musl/termios.h')
-rw-r--r-- | include/musl/termios.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/include/musl/termios.h b/include/musl/termios.h new file mode 100644 index 0000000..cbb5330 --- /dev/null +++ b/include/musl/termios.h @@ -0,0 +1,50 @@ +#ifndef _TERMIOS_H +#define _TERMIOS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <features.h> + +#define __NEED_pid_t +#define __NEED_struct_winsize + +#include <bits/alltypes.h> + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#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 |