Commit | Line | Data |
---|---|---|
1aa0bb57 KB |
1 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | */ | |
7 | ||
8 | #ifndef lint | |
34129485 | 9 | static char sccsid[] = "@(#)ttydefaults.c 5.2 (Berkeley) %G%"; |
1aa0bb57 KB |
10 | #endif /* not lint */ |
11 | ||
12 | #include <sys/termios.h> | |
13 | ||
34129485 KB |
14 | #include "extern.h" |
15 | ||
16 | void | |
1aa0bb57 KB |
17 | set_ttydefaults(fd) |
18 | int fd; | |
19 | { | |
20 | struct termios term; | |
21 | ||
22 | tcgetattr(fd, &term); | |
23 | term.c_iflag = TTYDEF_IFLAG; | |
24 | term.c_oflag = TTYDEF_OFLAG; | |
25 | term.c_lflag = TTYDEF_LFLAG; | |
26 | term.c_cflag = TTYDEF_CFLAG; | |
27 | tcsetattr(fd, TCSAFLUSH, &term); | |
28 | } |