4 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
14 * Revision 1.4 2008/02/04 20:23:55 james
15 * *** empty log message ***
17 * Revision 1.3 2008/02/04 05:45:55 james
20 * Revision 1.2 2008/02/04 02:05:06 james
21 * *** empty log message ***
23 * Revision 1.1 2008/02/03 16:20:24 james
24 * *** empty log message ***
31 struct termios old = { 0 };
36 tcsetattr (0, TCSANOW, &old);
44 struct termios raw = { 0 };
57 tcsetattr (0, TCSANOW, &raw);
65 fd = open_fd_to_bash ();
74 if (select (fd + 1, &rfd, NULL, NULL, NULL) <= 0)
76 if (FD_ISSET (0, &rfd))
78 if ((read (0, &c, 1) <= 0) || (c == 3))
83 if (FD_ISSET (fd, &rfd))
85 if ((read (fd, &c, 1) <= 0))
88 vt102_parse_char (&v, c);
89 ansi_draw (&a, &v.crt);
92 tcsetattr (0, TCSANOW, &old);