Add cfmakeraw() emulation
This commit is contained in:
parent
a174bba817
commit
a5735b8967
14
c/os_sunos.c
14
c/os_sunos.c
|
@ -1,3 +1,5 @@
|
|||
#include <sys/termios.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -14,3 +16,15 @@ char *get_exename(char *buf, size_t size)
|
|||
(void)size;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void cfmakeraw(struct termios *t)
|
||||
{
|
||||
t->c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR |
|
||||
IGNCR | ICRNL | IXON);
|
||||
t->c_oflag &= ~OPOST;
|
||||
t->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
|
||||
t->c_cflag &= ~(CSIZE | PARENB);
|
||||
t->c_cflag |= CS8;
|
||||
t->c_cc[VMIN] = 1;
|
||||
t->c_cc[VTIME] = 0;
|
||||
}
|
||||
|
|
|
@ -218,6 +218,8 @@ static void relocate_dir(value_t oldv, value_t newv)
|
|||
static struct termios term_mode_orig;
|
||||
static struct termios term_mode_raw;
|
||||
|
||||
void cfmakeraw(struct termios *t);
|
||||
|
||||
static void term_mode_init(void)
|
||||
{
|
||||
static int done;
|
||||
|
|
Loading…
Reference in New Issue