summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>1999-08-13 01:54:32 +0000
committerPaul Mackerras <paulus@samba.org>1999-08-13 01:54:32 +0000
commit4808373207947dffebef097fe80e4f3cb9b28631 (patch)
treea052ddd3f8f838ae31383bbdeac2217851cf52cb
parent3af7b529609dfc5ef233634f3a17d091e2234252 (diff)
downloadppp-4808373207947dffebef097fe80e4f3cb9b28631.tar.gz
fix problem with REPORTing last line
-rw-r--r--chat/Makefile.linux6
-rw-r--r--chat/chat.c32
2 files changed, 19 insertions, 19 deletions
diff --git a/chat/Makefile.linux b/chat/Makefile.linux
index b0a14b9..6568cbb 100644
--- a/chat/Makefile.linux
+++ b/chat/Makefile.linux
@@ -1,4 +1,4 @@
-# $Id: Makefile.linux,v 1.8 1999/08/12 03:56:21 paulus Exp $
+# $Id: Makefile.linux,v 1.9 1999/08/13 01:54:32 paulus Exp $
CDEF1= -DTERMIOS # Use the termios structure
CDEF2= -DSIGTYPE=void # Standard definition
@@ -6,14 +6,14 @@ CDEF3= -UNO_SLEEP # Use the usleep function
CDEF4= -DFNDELAY=O_NDELAY # Old name value
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
-CFLAGS= -O2 -pipe $(CDEFS)
+CFLAGS= -O2 -g -pipe $(CDEFS)
INSTALL= install
all: chat
chat: chat.o
- $(CC) -s -O2 -o chat chat.o
+ $(CC) -o chat chat.o
chat.o: chat.c
$(CC) -c $(CFLAGS) -o chat.o chat.c
diff --git a/chat/chat.c b/chat/chat.c
index 6206cbe..0015e2b 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -81,7 +81,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: chat.c,v 1.22 1999/08/12 03:56:05 paulus Exp $";
+static const char rcsid[] = "$Id: chat.c,v 1.23 1999/08/13 01:54:32 paulus Exp $";
#endif
#include <stdio.h>
@@ -615,26 +615,26 @@ int status;
exit(status);
terminating = 1;
echo_stderr(-1);
- if (report_file != (char *) 0 && report_fp != (FILE *) NULL) {
/*
* Allow the last of the report string to be gathered before we terminate.
*/
- if (report_gathering) {
- int c, rep_len;
+ if (report_gathering) {
+ int c, rep_len;
- rep_len = strlen(report_buffer);
- while (rep_len + 1 <= sizeof(report_buffer)) {
- alarm(1);
- c = get_char();
- alarm(0);
- if (c < 0 || iscntrl(c))
- break;
- report_buffer[rep_len] = c;
- ++rep_len;
- }
- report_buffer[rep_len] = 0;
- fprintf (report_fp, "chat: %s\n", report_buffer);
+ rep_len = strlen(report_buffer);
+ while (rep_len + 1 <= sizeof(report_buffer)) {
+ alarm(1);
+ c = get_char();
+ alarm(0);
+ if (c < 0 || iscntrl(c))
+ break;
+ report_buffer[rep_len] = c;
+ ++rep_len;
}
+ report_buffer[rep_len] = 0;
+ fprintf (report_fp, "chat: %s\n", report_buffer);
+ }
+ if (report_file != (char *) 0 && report_fp != (FILE *) NULL) {
if (verbose)
fprintf (report_fp, "Closing \"%s\".\n", report_file);
fclose (report_fp);