summaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>1998-02-04 01:35:49 +0000
committerPaul Mackerras <paulus@samba.org>1998-02-04 01:35:49 +0000
commit39f685ec9a552874cd02b511bbf84b3912b1058b (patch)
treed141fcd7cc2ed12d44193c11e3d48e96eca491bd /chat
parent19d3ee84fd8180eabe80be4b08ed81ae080d69ce (diff)
minor fixes, for SunOS and micro-getopt
Diffstat (limited to 'chat')
-rw-r--r--chat/chat.87
-rw-r--r--chat/chat.c15
2 files changed, 12 insertions, 10 deletions
diff --git a/chat/chat.8 b/chat/chat.8
index 634d9a4..2612d67 100644
--- a/chat/chat.8
+++ b/chat/chat.8
@@ -1,6 +1,6 @@
.\" -*- nroff -*-
.\" manual page [] for chat 1.8
-.\" $Id: chat.8,v 1.6 1997/11/27 06:00:06 paulus Exp $
+.\" $Id: chat.8,v 1.7 1998/02/04 01:35:49 paulus Exp $
.\" SH section heading
.\" SS subsection heading
.\" LP paragraph
@@ -61,10 +61,7 @@ Request that the \fIchat\fR script be executed in a stderr verbose
mode. The \fIchat\fR program will then log all text received from the
modem and the output strings sent to the modem to the stderr device. This
device is usually the local console at the station running the chat or
-pppd program. This option will not work properly if the stderr is
-redirected to the /dev/null location as is the case should pppd be run
-in the 'detached' mode. In that case, use the '-v' option to record
-the session on the SYSLOG device.
+pppd program.
.TP
.B -s
Use stderr. All log messages from '-v' and all error messages will be
diff --git a/chat/chat.c b/chat/chat.c
index 1b744a9..90dcc5b 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -78,7 +78,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: chat.c,v 1.17 1997/11/27 06:37:15 paulus Exp $";
+static char rcsid[] = "$Id: chat.c,v 1.18 1998/02/04 01:35:49 paulus Exp $";
#endif
#include <stdio.h>
@@ -130,9 +130,17 @@ static char rcsid[] = "$Id: chat.c,v 1.17 1997/11/27 06:37:15 paulus Exp $";
#define O_NONBLOCK O_NDELAY
#endif
+#ifdef SUNOS
+extern int sys_nerr;
+extern char *sys_errlist[];
+#define memmove(to, from, n) bcopy(from, to, n)
+#define strerror(n) ((unsigned)(n) < sys_nerr? sys_errlist[(n)] :\
+ "unknown error")
+#endif
+
/*************** Micro getopt() *********************************************/
#define OPTION(c,v) (_O&2&&**v?*(*v)++:!c||_O&4?0:(!(_O&1)&& \
- ((--c,++v),_O=4,c)&&**v=='-'&&v[0][1]?*++*v=='-'\
+ (--c,++v),_O=4,c&&**v=='-'&&v[0][1]?*++*v=='-'\
&&!v[0][1]?(--c,++v,0):(_O=2,*(*v)++):0))
#define OPTARG(c,v) (_O&2?**v||(++v,--c)?(_O=1,--c,*v++): \
(_O=4,(char*)0):(char*)0)
@@ -1004,7 +1012,6 @@ register char *s;
if (clear_abort_next) {
char *s1;
- char *s2 = s;
int i;
int old_max;
int pack = 0;
@@ -1055,7 +1062,6 @@ register char *s;
if (clear_report_next) {
char *s1;
- char *s2 = s;
int i;
int old_max;
int pack = 0;
@@ -1478,7 +1484,6 @@ vfmtmsg(buf, buflen, fmt, args)
const char *f;
unsigned char *p;
char num[32];
- time_t t;
static char hexchars[] = "0123456789abcdef";
buf0 = buf;