aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorjames <>2008-02-24 00:47:14 +0000
committerjames <>2008-02-24 00:47:14 +0000
commitd338f6d46af0d6b5e746203748ba7cc9242020cb (patch)
tree3400ccf8db2c56670adfff5ced8a236d936b7588 /src/util.c
parent3240b828391da405d093356eae0b90af5abc7a32 (diff)
downloadsympathy-d338f6d46af0d6b5e746203748ba7cc9242020cb.tar.gz
sympathy-d338f6d46af0d6b5e746203748ba7cc9242020cb.tar.bz2
sympathy-d338f6d46af0d6b5e746203748ba7cc9242020cb.zip
*** empty log message ***
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c46
1 files changed, 32 insertions, 14 deletions
diff --git a/src/util.c b/src/util.c
index ba1e309..e8b221a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.5 2008/02/24 00:42:53 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/23 13:05:58 staffcvs
* *** empty log message ***
*
@@ -78,17 +81,15 @@ set_blocking (int fd)
fcntl (fd, F_SETFL, arg);
}
+
+
void
-raw_termios (struct termios *termios)
+default_termios (struct termios *termios)
{
-
- termios->c_iflag = 0;
-/*ICRNL | IXON;*/
+ termios->c_iflag = PARMRK | INPCK;
termios->c_oflag = NL0 | CR0 | TAB0 | BS0 | VT0 | FF0;
termios->c_lflag = 0;
-/*
- ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE;
-*/
+ termios->c_cflag = CS8 | CREAD | CLOCAL;
termios->c_cc[VINTR] = 003;
termios->c_cc[VQUIT] = 034;
@@ -105,19 +106,36 @@ raw_termios (struct termios *termios)
termios->c_cc[VREPRINT] = 022;
termios->c_cc[VDISCARD] = 017;
+
}
void
-default_termios (struct termios *termios)
+client_termios (struct termios *termios)
{
+ memset (termios, 0, sizeof (termios));
-// memset (termios, 0, sizeof (termios));
+ termios->c_iflag = ICRNL | IXON | PARMRK | INPCK;
+ termios->c_oflag = OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0;
+ termios->c_lflag =
+ ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE;
+ termios->c_cflag = CS8 | CREAD | CLOCAL;
- raw_termios (termios);
+ termios->c_cc[VINTR] = 003;
+ termios->c_cc[VQUIT] = 034;
+ termios->c_cc[VERASE] = 0177;
+ termios->c_cc[VKILL] = 025;
+ termios->c_cc[VEOF] = 004;
+ termios->c_cc[VEOL] = 0;
+ termios->c_cc[VEOL2] = 0;
+ termios->c_cc[VSTART] = 021;
+ termios->c_cc[VSTOP] = 023;
+ termios->c_cc[VSUSP] = 032;
+ termios->c_cc[VLNEXT] = 026;
+ termios->c_cc[VWERASE] = 027;
+ termios->c_cc[VREPRINT] = 022;
+ termios->c_cc[VDISCARD] = 017;
- termios->c_cflag = CS8 | CREAD | CLOCAL;
- termios->c_iflag |= PARMRK | INPCK;
- //cfsetispeed (termios, B9600);
- //cfsetospeed (termios, B9600);
+ cfsetispeed (termios, B9600);
+ cfsetospeed (termios, B9600);
}