Drop main() prototype. Syncs with NetBSD-8
[minix.git] / external / bsd / tmux / dist / compat / cfmakeraw.c
blob9bd90c463f01e9ae6da6bfb425bba3dd3fdc4417
1 /* Id */
3 /*
4 * Copyright (c) 2013 Dagobert Michelsen
5 * Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
16 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
17 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <string.h>
22 #include "tmux.h"
24 void
25 cfmakeraw(struct termios *tio)
27 tio->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
28 tio->c_oflag &= ~OPOST;
29 tio->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
30 tio->c_cflag &= ~(CSIZE|PARENB);
31 tio->c_cflag |= CS8;