/*
* $Log$
+ * Revision 1.11 2008/02/26 23:23:17 james
+ * *** empty log message ***
+ *
+ * Revision 1.10 2008/02/24 00:47:14 james
+ * *** empty log message ***
+ *
+ * Revision 1.9 2008/02/24 00:42:53 james
+ * *** empty log message ***
+ *
+ * Revision 1.8 2008/02/23 13:05:58 staffcvs
+ * *** empty log message ***
+ *
* Revision 1.7 2008/02/15 23:52:12 james
* *** empty log message ***
*
if (!l)
return NULL;
- default_termios (&termios);
fd = open (path, O_RDWR | O_NOCTTY | O_NONBLOCK);
set_nonblocking (fd);
+
+ if (tcgetattr (fd, &termios))
+ {
+ close (fd);
+ return NULL;
+ }
+ default_termios (&termios);
+
+ if (tcsetattr (fd, TCSANOW, &termios))
+ {
+ close (fd);
+ return NULL;
+ }
+
t = (Serial *) malloc (sizeof (Serial));
t->lock = l;
t->fd = fd;
t->rfd = t->fd;
t->wfd = t->fd;
- t->size.x = VT102_COLS;
+ t->size.x = VT102_COLS_80;
t->size.y = VT102_ROWS;
t->blocked = serial_lock_check (t->lock);
t->hanging_up = 0;