Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit 17d7fae

Browse files
jclulowlarsks
authored andcommitted
XXX add cfmakeraw() for illumos
1 parent a32084e commit 17d7fae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

term.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,22 @@ term_apply (int fd, int now)
753753

754754
/***************************************************************************/
755755

756+
#ifdef __sun
757+
void
758+
cfmakeraw(struct termios *tio)
759+
{
760+
tio->c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR |
761+
IGNCR | ICRNL | IXON);
762+
tio->c_oflag &= ~OPOST;
763+
tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
764+
tio->c_cflag &= ~(CSIZE | PARENB);
765+
tio->c_cflag |= CS8;
766+
767+
tio->c_cc[VMIN] = 1;
768+
tio->c_cc[VTIME] = 0;
769+
}
770+
#endif
771+
756772
int
757773
term_set_raw (int fd)
758774
{

0 commit comments

Comments
 (0)