date and time created 81/05/09 16:34:36 by root
[unix-history] / usr / src / old / vfilters / necf / necf.c
CommitLineData
ad2055c1
BJ
1/* necf.c 1.1 81/05/09 */
2#include <stdio.h>
3#include <sgtty.h>
4#include <signal.h>
5
6struct sgttyb tty;
7
8main()
9{
10 extern char _sobuf[BUFSIZ];
11 register char c;
12
13 signal(SIGINT, SIG_IGN);
14 signal(SIGQUIT, SIG_IGN);
15 signal(SIGHUP, SIG_IGN);
16 signal(SIGTERM, SIG_IGN);
17
18 tty.sg_ispeed = tty.sg_ospeed = B4800;
19 tty.sg_erase = tty.sg_kill = -1;
20 tty.sg_flags = (ANYP|XTABS|CRMOD|FLCTRL);
21 if (ioctl(1, TIOCSETP, (char *)&tty) < 0)
22 exit (2);
23 setbuf(stdout, _sobuf);
24 printf ("\033=\r");
25 while ((c = getchar()) != EOF)
26 putchar (c);
27 printf ("\033=\r");
28 fflush (stdout);
29}