/* Copyright (c)1994-2000 Begemot Computer Associates. All rights reserved.
 * See the file COPYRIGHT for details of redistribution and use. */
# ifndef HAVE_CFMAKERAW

# include "util.h"
# include "../cdefs.h"

RCSID("$Id: cfmakeraw.c 461 2000-12-04 17:03:43Z hbb $")

/*
 * make tty raw
 */
void
cfmakeraw(struct termios *t)
{
        t->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | INPCK | ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXOFF | IXANY);
	t->c_iflag |= IGNPAR;
        t->c_oflag &= ~OPOST;
        t->c_cflag &= ~(CSIZE | PARENB);
        t->c_cflag |= CS8;
        t->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
	t->c_cc[VMIN] = 1;
	t->c_cc[VTIME] = 0;
}
# endif
