diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-09 13:14:01 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-09 13:14:01 -0500 |
| commit | 253a32e2f9ff1cbb8edbe7c79834a678daebeb93 (patch) | |
| tree | 599cf5baf01c6dae33a2f89989b08b7d553f7fd0 /src/termios | |
| parent | 88d0b5e7ffbf0554b236dc46225846061b5f4817 (diff) | |
merge POSIX.1-1988/1990
Diffstat (limited to 'src/termios')
84 files changed, 533 insertions, 0 deletions
diff --git a/src/termios/B0.c b/src/termios/B0.c new file mode 100644 index 00000000..5409219e --- /dev/null +++ b/src/termios/B0.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B0 (0) +/* +POSIX(1) +*/ diff --git a/src/termios/B110.c b/src/termios/B110.c new file mode 100644 index 00000000..e0ef2d00 --- /dev/null +++ b/src/termios/B110.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B110 (110) +/* +POSIX(1) +*/ diff --git a/src/termios/B1200.c b/src/termios/B1200.c new file mode 100644 index 00000000..74fee7ae --- /dev/null +++ b/src/termios/B1200.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B1200 (1200) +/* +POSIX(1) +*/ diff --git a/src/termios/B134.c b/src/termios/B134.c new file mode 100644 index 00000000..903b26ba --- /dev/null +++ b/src/termios/B134.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B134 (134) +/* +POSIX(1) +*/ diff --git a/src/termios/B150.c b/src/termios/B150.c new file mode 100644 index 00000000..6e1f8d53 --- /dev/null +++ b/src/termios/B150.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B150 (150) +/* +POSIX(1) +*/ diff --git a/src/termios/B1800.c b/src/termios/B1800.c new file mode 100644 index 00000000..667ab049 --- /dev/null +++ b/src/termios/B1800.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B1800 (1800) +/* +POSIX(1) +*/ diff --git a/src/termios/B19200.c b/src/termios/B19200.c new file mode 100644 index 00000000..7398414c --- /dev/null +++ b/src/termios/B19200.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B19200 (19200) +/* +POSIX(1) +*/ diff --git a/src/termios/B200.c b/src/termios/B200.c new file mode 100644 index 00000000..466be6ae --- /dev/null +++ b/src/termios/B200.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B200 (200) +/* +POSIX(1) +*/ diff --git a/src/termios/B2400.c b/src/termios/B2400.c new file mode 100644 index 00000000..894db7aa --- /dev/null +++ b/src/termios/B2400.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B2400 (2400) +/* +POSIX(1) +*/ diff --git a/src/termios/B300.c b/src/termios/B300.c new file mode 100644 index 00000000..43fea2ad --- /dev/null +++ b/src/termios/B300.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B300 (300) +/* +POSIX(1) +*/ diff --git a/src/termios/B38400.c b/src/termios/B38400.c new file mode 100644 index 00000000..9d785894 --- /dev/null +++ b/src/termios/B38400.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B38400 (38400) +/* +POSIX(1) +*/ diff --git a/src/termios/B4800.c b/src/termios/B4800.c new file mode 100644 index 00000000..d4059f6d --- /dev/null +++ b/src/termios/B4800.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B4800 (4800) +/* +POSIX(1) +*/ diff --git a/src/termios/B50.c b/src/termios/B50.c new file mode 100644 index 00000000..44109e91 --- /dev/null +++ b/src/termios/B50.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B50 (50) +/* +POSIX(1) +*/ diff --git a/src/termios/B600.c b/src/termios/B600.c new file mode 100644 index 00000000..46a077d9 --- /dev/null +++ b/src/termios/B600.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B600 (600) +/* +POSIX(1) +*/ diff --git a/src/termios/B75.c b/src/termios/B75.c new file mode 100644 index 00000000..001c7e84 --- /dev/null +++ b/src/termios/B75.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B75 (75) +/* +POSIX(1) +*/ diff --git a/src/termios/B9600.c b/src/termios/B9600.c new file mode 100644 index 00000000..518a3748 --- /dev/null +++ b/src/termios/B9600.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define B9600 (9600) +/* +POSIX(1) +*/ diff --git a/src/termios/BRKINT.c b/src/termios/BRKINT.c new file mode 100644 index 00000000..383dbac5 --- /dev/null +++ b/src/termios/BRKINT.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define BRKINT /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CLOCAL.c b/src/termios/CLOCAL.c new file mode 100644 index 00000000..a2e64633 --- /dev/null +++ b/src/termios/CLOCAL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CLOCAL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CREAD.c b/src/termios/CREAD.c new file mode 100644 index 00000000..7afdf721 --- /dev/null +++ b/src/termios/CREAD.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CREAD /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CS5.c b/src/termios/CS5.c new file mode 100644 index 00000000..ca402a98 --- /dev/null +++ b/src/termios/CS5.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CS5 /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CS6.c b/src/termios/CS6.c new file mode 100644 index 00000000..04a7ae68 --- /dev/null +++ b/src/termios/CS6.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CS6 /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CS7.c b/src/termios/CS7.c new file mode 100644 index 00000000..34f8c7bf --- /dev/null +++ b/src/termios/CS7.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CS7 /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CS8.c b/src/termios/CS8.c new file mode 100644 index 00000000..ef7837ab --- /dev/null +++ b/src/termios/CS8.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CS8 /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CSIZE.c b/src/termios/CSIZE.c new file mode 100644 index 00000000..b6c42b22 --- /dev/null +++ b/src/termios/CSIZE.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CSIZE /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/CSTOPB.c b/src/termios/CSTOPB.c new file mode 100644 index 00000000..05cefcad --- /dev/null +++ b/src/termios/CSTOPB.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define CSTOPB /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ECHO.c b/src/termios/ECHO.c new file mode 100644 index 00000000..aeec4619 --- /dev/null +++ b/src/termios/ECHO.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ECHO /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ECHOE.c b/src/termios/ECHOE.c new file mode 100644 index 00000000..078cd979 --- /dev/null +++ b/src/termios/ECHOE.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ECHOE /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ECHOK.c b/src/termios/ECHOK.c new file mode 100644 index 00000000..04464d14 --- /dev/null +++ b/src/termios/ECHOK.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ECHOK /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ECHONL.c b/src/termios/ECHONL.c new file mode 100644 index 00000000..5ff6838b --- /dev/null +++ b/src/termios/ECHONL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ECHONL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/HUPCL.c b/src/termios/HUPCL.c new file mode 100644 index 00000000..1be7ff10 --- /dev/null +++ b/src/termios/HUPCL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define HUPCL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ICANON.c b/src/termios/ICANON.c new file mode 100644 index 00000000..f3227ca8 --- /dev/null +++ b/src/termios/ICANON.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ICANON /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ICRNL.c b/src/termios/ICRNL.c new file mode 100644 index 00000000..e203abbb --- /dev/null +++ b/src/termios/ICRNL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ICRNL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IEXTEN.c b/src/termios/IEXTEN.c new file mode 100644 index 00000000..3358e27d --- /dev/null +++ b/src/termios/IEXTEN.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IEXTEN /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IGNBRK.c b/src/termios/IGNBRK.c new file mode 100644 index 00000000..00003681 --- /dev/null +++ b/src/termios/IGNBRK.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IGNBRK /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IGNCR.c b/src/termios/IGNCR.c new file mode 100644 index 00000000..c8848d8d --- /dev/null +++ b/src/termios/IGNCR.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IGNCR /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IGNPAR.c b/src/termios/IGNPAR.c new file mode 100644 index 00000000..caf85715 --- /dev/null +++ b/src/termios/IGNPAR.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IGNPAR /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/INLCR.c b/src/termios/INLCR.c new file mode 100644 index 00000000..b49d50fb --- /dev/null +++ b/src/termios/INLCR.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define INLCR /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/INPCK.c b/src/termios/INPCK.c new file mode 100644 index 00000000..8604e0ff --- /dev/null +++ b/src/termios/INPCK.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define INPCK /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ISIG.c b/src/termios/ISIG.c new file mode 100644 index 00000000..4e3e0234 --- /dev/null +++ b/src/termios/ISIG.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ISIG /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/ISTRIP.c b/src/termios/ISTRIP.c new file mode 100644 index 00000000..f794d859 --- /dev/null +++ b/src/termios/ISTRIP.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define ISTRIP /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IXOFF.c b/src/termios/IXOFF.c new file mode 100644 index 00000000..8b8f9bfd --- /dev/null +++ b/src/termios/IXOFF.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IXOFF /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/IXON.c b/src/termios/IXON.c new file mode 100644 index 00000000..862a5ef5 --- /dev/null +++ b/src/termios/IXON.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define IXON /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/NCCS.c b/src/termios/NCCS.c new file mode 100644 index 00000000..f16fb67b --- /dev/null +++ b/src/termios/NCCS.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define NCCS /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/NOFLSH.c b/src/termios/NOFLSH.c new file mode 100644 index 00000000..a5700711 --- /dev/null +++ b/src/termios/NOFLSH.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define NOFLSH /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/OPOST.c b/src/termios/OPOST.c new file mode 100644 index 00000000..416b0b44 --- /dev/null +++ b/src/termios/OPOST.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define OPOST /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/PARENB.c b/src/termios/PARENB.c new file mode 100644 index 00000000..a51711c5 --- /dev/null +++ b/src/termios/PARENB.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define PARENB /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/PARMRK.c b/src/termios/PARMRK.c new file mode 100644 index 00000000..380163fa --- /dev/null +++ b/src/termios/PARMRK.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define PARMRK /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/PARODD.c b/src/termios/PARODD.c new file mode 100644 index 00000000..57f12684 --- /dev/null +++ b/src/termios/PARODD.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define PARODD /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCIFLUSH.c b/src/termios/TCIFLUSH.c new file mode 100644 index 00000000..bdcad63a --- /dev/null +++ b/src/termios/TCIFLUSH.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCIFLUSH /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCIOFF.c b/src/termios/TCIOFF.c new file mode 100644 index 00000000..2c2abf8d --- /dev/null +++ b/src/termios/TCIOFF.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCIOFF /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCIOFLUSH.c b/src/termios/TCIOFLUSH.c new file mode 100644 index 00000000..be6f0a4f --- /dev/null +++ b/src/termios/TCIOFLUSH.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCIOFLUSH /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCION.c b/src/termios/TCION.c new file mode 100644 index 00000000..bddc0468 --- /dev/null +++ b/src/termios/TCION.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCION /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCOFLUSH.c b/src/termios/TCOFLUSH.c new file mode 100644 index 00000000..5e137330 --- /dev/null +++ b/src/termios/TCOFLUSH.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCOFLUSH /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCOOFF.c b/src/termios/TCOOFF.c new file mode 100644 index 00000000..73b915fb --- /dev/null +++ b/src/termios/TCOOFF.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCOOFF /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCOON.c b/src/termios/TCOON.c new file mode 100644 index 00000000..9ac4dce2 --- /dev/null +++ b/src/termios/TCOON.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCOON /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCSADRAIN.c b/src/termios/TCSADRAIN.c new file mode 100644 index 00000000..07a646cf --- /dev/null +++ b/src/termios/TCSADRAIN.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCSADRAIN /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCSAFLUSH.c b/src/termios/TCSAFLUSH.c new file mode 100644 index 00000000..56f103a7 --- /dev/null +++ b/src/termios/TCSAFLUSH.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCSAFLUSH /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TCSANOW.c b/src/termios/TCSANOW.c new file mode 100644 index 00000000..642c9bd4 --- /dev/null +++ b/src/termios/TCSANOW.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TCSANOW /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/TOSTOP.c b/src/termios/TOSTOP.c new file mode 100644 index 00000000..e187a4ff --- /dev/null +++ b/src/termios/TOSTOP.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define TOSTOP /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VEOF.c b/src/termios/VEOF.c new file mode 100644 index 00000000..f280cb44 --- /dev/null +++ b/src/termios/VEOF.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VEOF /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VEOL.c b/src/termios/VEOL.c new file mode 100644 index 00000000..c97e237b --- /dev/null +++ b/src/termios/VEOL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VEOL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VERASE.c b/src/termios/VERASE.c new file mode 100644 index 00000000..a8afca17 --- /dev/null +++ b/src/termios/VERASE.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VERASE /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VINTR.c b/src/termios/VINTR.c new file mode 100644 index 00000000..7aab15de --- /dev/null +++ b/src/termios/VINTR.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VINTR /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VKILL.c b/src/termios/VKILL.c new file mode 100644 index 00000000..c6d3c90e --- /dev/null +++ b/src/termios/VKILL.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VKILL /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VMIN.c b/src/termios/VMIN.c new file mode 100644 index 00000000..5a2bab96 --- /dev/null +++ b/src/termios/VMIN.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VMIN /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VQUIT.c b/src/termios/VQUIT.c new file mode 100644 index 00000000..ad01350b --- /dev/null +++ b/src/termios/VQUIT.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VQUIT /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VSTART.c b/src/termios/VSTART.c new file mode 100644 index 00000000..bdd1c30c --- /dev/null +++ b/src/termios/VSTART.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VSTART /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VSTOP.c b/src/termios/VSTOP.c new file mode 100644 index 00000000..00047eec --- /dev/null +++ b/src/termios/VSTOP.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VSTOP /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VSUSP.c b/src/termios/VSUSP.c new file mode 100644 index 00000000..fc3c6586 --- /dev/null +++ b/src/termios/VSUSP.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VSUSP /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/VTIME.c b/src/termios/VTIME.c new file mode 100644 index 00000000..015bf2fd --- /dev/null +++ b/src/termios/VTIME.c @@ -0,0 +1,5 @@ +#include <termios.h> +#define VTIME /* TBD */ +/* +POSIX(1) +*/ diff --git a/src/termios/cc_t.c b/src/termios/cc_t.c new file mode 100644 index 00000000..eff66f77 --- /dev/null +++ b/src/termios/cc_t.c @@ -0,0 +1,5 @@ +#include <termios.h> +typedef int cc_t; +/* +POSIX(1) +*/ diff --git a/src/termios/cfgetispeed.c b/src/termios/cfgetispeed.c new file mode 100644 index 00000000..8b7e91fb --- /dev/null +++ b/src/termios/cfgetispeed.c @@ -0,0 +1,11 @@ +#include <termios.h> +#include "nonstd/assert.h" + +speed_t cfgetispeed(const struct termios *termios_p) +{ + ASSERT_NONNULL(termios_p); + return termios_p->c_iflag; /* FIXME */ +} +/* +POSIX(1) +*/ diff --git a/src/termios/cfgetospeed.c b/src/termios/cfgetospeed.c new file mode 100644 index 00000000..88f13c9e --- /dev/null +++ b/src/termios/cfgetospeed.c @@ -0,0 +1,11 @@ +#include <termios.h> +#include "nonstd/assert.h" + +speed_t cfgetospeed(const struct termios *termios_p) +{ + ASSERT_NONNULL(termios_p); + return termios_p->c_oflag; /* FIXME */ +} +/* +POSIX(1) +*/ diff --git a/src/termios/cfsetispeed.c b/src/termios/cfsetispeed.c new file mode 100644 index 00000000..a500ba49 --- /dev/null +++ b/src/termios/cfsetispeed.c @@ -0,0 +1,37 @@ +#include <termios.h> +#include "nonstd/assert.h" + +int cfsetispeed(struct termios *termios_p, speed_t speed) +{ + ASSERT_NONNULL(termios_p); + + switch (speed) { + case B0: + case B50: + case B75: + case B110: + case B134: + case B150: + case B200: + case B300: + case B600: + case B1200: + case B1800: + case B2400: + case B4800: + case B9600: + case B19200: + case B38400: + termios_p->c_iflag = speed; /* FIXME */ + return 0; + + default: + break; + } + + errno = EINVAL; + return -1; +} +/* +POSIX(1) +*/ diff --git a/src/termios/cfsetospeed.c b/src/termios/cfsetospeed.c new file mode 100644 index 00000000..9c11b4d8 --- /dev/null +++ b/src/termios/cfsetospeed.c @@ -0,0 +1,36 @@ +#include <termios.h> +#include "nonstd/assert.h" + +int cfsetospeed(struct termios *termios_p, speed_t speed) +{ + ASSERT_NONNULL(termios_p); + switch (speed) { + case B0: + case B50: + case B75: + case B110: + case B134: + case B150: + case B200: + case B300: + case B600: + case B1200: + case B1800: + case B2400: + case B4800: + case B9600: + case B19200: + case B38400: + termios_p->c_oflag = speed; /* FIXME */ + return 0; + + default: + break; + } + + errno = EINVAL; + return -1; +} +/* +POSIX(1) +*/ diff --git a/src/termios/speed_t.c b/src/termios/speed_t.c new file mode 100644 index 00000000..142fe5c8 --- /dev/null +++ b/src/termios/speed_t.c @@ -0,0 +1,5 @@ +#include <termios.h> +typedef int speed_t; +/* +POSIX(1) +*/ diff --git a/src/termios/struct_termios.c b/src/termios/struct_termios.c new file mode 100644 index 00000000..5f9a6909 --- /dev/null +++ b/src/termios/struct_termios.c @@ -0,0 +1,13 @@ +#include <termios.h> + +struct termios { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_cc[NCCS]; +}; + +/* +POSIX(1) +*/ diff --git a/src/termios/tcdrain.c b/src/termios/tcdrain.c new file mode 100644 index 00000000..a0963b83 --- /dev/null +++ b/src/termios/tcdrain.c @@ -0,0 +1,9 @@ +#include <termios.h> + +int tcdrain(int fildes) +{ + return fildes; +} +/* +POSIX(1) +*/ diff --git a/src/termios/tcflag_t.c b/src/termios/tcflag_t.c new file mode 100644 index 00000000..b955f566 --- /dev/null +++ b/src/termios/tcflag_t.c @@ -0,0 +1,5 @@ +#include <termios.h> +typedef unsigned int tcflag_t; +/* +POSIX(1) +*/ diff --git a/src/termios/tcflow.c b/src/termios/tcflow.c new file mode 100644 index 00000000..05898373 --- /dev/null +++ b/src/termios/tcflow.c @@ -0,0 +1,11 @@ +#include <termios.h> + +int tcflow(int fildes, int action) +{ + (void)fildes; + return action; +} + +/* +POSIX(1) +*/ diff --git a/src/termios/tcflush.c b/src/termios/tcflush.c new file mode 100644 index 00000000..28933528 --- /dev/null +++ b/src/termios/tcflush.c @@ -0,0 +1,10 @@ +#include <termios.h> + +int tcflush(int fildes, int queue_selector) +{ + (void)queue_selector; + return fildes; +} +/* +POSIX(1) +*/ diff --git a/src/termios/tcgetattr.c b/src/termios/tcgetattr.c new file mode 100644 index 00000000..f9ebe024 --- /dev/null +++ b/src/termios/tcgetattr.c @@ -0,0 +1,10 @@ +#include <termios.h> + +int tcgetattr(int fildes, struct termios *termios_p) +{ + (void)termios_p; + return fildes; +} +/* +POSIX(1) +*/ diff --git a/src/termios/tcsendbreak.c b/src/termios/tcsendbreak.c new file mode 100644 index 00000000..7c728aa3 --- /dev/null +++ b/src/termios/tcsendbreak.c @@ -0,0 +1,10 @@ +#include <termios.h> + +int tcsendbreak(int fildes, int duration) +{ + (void)duration; + return fildes; +} +/* +POSIX(1) +*/ diff --git a/src/termios/tcsetattr.c b/src/termios/tcsetattr.c new file mode 100644 index 00000000..b68652ad --- /dev/null +++ b/src/termios/tcsetattr.c @@ -0,0 +1,10 @@ +#include <termios.h> + +int tcsetattr(int fildes, int optional_actions, struct termios *termios_p) +{ + (void)optional_actions; (void)termios_p; + return fildes; +} +/* +POSIX(1) +*/ |
