]> git.ozlabs.org Git - ppp.git/commitdiff
minor fixes, for SunOS and micro-getopt
authorPaul Mackerras <paulus@samba.org>
Wed, 4 Feb 1998 01:35:49 +0000 (01:35 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 4 Feb 1998 01:35:49 +0000 (01:35 +0000)
chat/chat.8
chat/chat.c

index 634d9a4b522f0daca648769298f24dd142f28f58..2612d67ff775aa7218a19ee40123f3c2adcc5ee1 100644 (file)
@@ -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
index 1b744a958c8fc6448d6633f0a66bc984032b58e5..90dcc5be837cac3787c77d9fc5fe66c1bd858699 100644 (file)
@@ -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;