aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2011-02-28 18:11:10 +0000
committerjames <>2011-02-28 18:11:10 +0000
commit9a219228a74b32f3b3202609a155d8f22ba47da8 (patch)
tree3b7f0a43c36dfbeb4d830add2a2321f976da5016
parent3e5a64c4c299dc50b007ba73debbee5f4b634577 (diff)
downloadsympathy-9a219228a74b32f3b3202609a155d8f22ba47da8.tar.gz
sympathy-9a219228a74b32f3b3202609a155d8f22ba47da8.tar.bz2
sympathy-9a219228a74b32f3b3202609a155d8f22ba47da8.zip
*** empty log message ***
-rw-r--r--apps/usage.c8
-rw-r--r--src/raw.c22
2 files changed, 27 insertions, 3 deletions
diff --git a/apps/usage.c b/apps/usage.c
index 032f9a6..f29d9cd 100644
--- a/apps/usage.c
+++ b/apps/usage.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.28 2011/02/28 18:11:10 james
+ * *** empty log message ***
+ *
* Revision 1.27 2008/05/09 12:35:57 james
* *** empty log message ***
*
@@ -166,8 +169,9 @@ usage (void)
" -N provide dumb terminal emulation on stdin/stdout instead of\n"
" redering the display, for use with expect(1)\n"
" -I string inject string into terminal then quit (see man page\n"
- " for escapes\n");
-
+ " for escapes\n"
+ " -B log the raw data to the log file, rather than running it\n"
+ " thru the parity error, unicode, and vt102 parsers\n" );
exit (1);
}
diff --git a/src/raw.c b/src/raw.c
index bd48355..90960c6 100644
--- a/src/raw.c
+++ b/src/raw.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.10 2011/02/28 18:10:43 james
+ * *** empty log message ***
+ *
* Revision 1.9 2011/02/06 16:51:22 james
* *** empty log message ***
*
@@ -86,6 +89,23 @@ rx_new_raw (int rfd, int wfd)
return (RX *) ret;
}
+static int my_wrap_read (int fd, void *buf, int len)
+{
+ int red;
+
+ red = read (fd, buf, len);
+#if 1
+ if (!red)
+ return -1;
+#endif
+
+ if ((red < 0) && (errno == EAGAIN))
+ red = 0;
+
+ return red;
+}
+
+
static int
raw_terminal_read (TTY * _t, void *buf, int len)
@@ -97,7 +117,7 @@ raw_terminal_read (TTY * _t, void *buf, int len)
do {
- red = wrap_read (t->rfd, buf, len);
+ red = my_wrap_read (t->rfd, buf, len);
if (red < 0)
return done ? done:-1;
if (!red)