File: termios.c

package info (click to toggle)
cowdancer 0.47
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 696 kB
  • ctags: 179
  • sloc: ansic: 2,634; sh: 407; makefile: 116; cpp: 6; python: 4
file content (29 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*BINFMTC:

debugging code for termios.

 */
#include <stdio.h>
#include <termios.h>
#include <unistd.h>

int main(int ac, char**av)
{
  struct termios t;

  tcgetattr(0, &t);
  
  printf("%x\n%x\n%x\n%x\n", 
	 t.c_iflag,
	 t.c_oflag,
	 t.c_cflag,
	 t.c_lflag);

  printf ("%i\n", 
	  t.c_lflag & ECHO );

  t.c_lflag |= ECHO;
  tcsetattr(0, TCSADRAIN, &t);
  
  return 0;
}