chat.c (102084) | chat.c (102412) |
---|---|
1/* 2 * Chat -- a program for automatic session establishment (i.e. dial 3 * the phone and log in). 4 * 5 * Standard termination codes: 6 * 0 - successful completion of the script 7 * 1 - invalid argument, expect string too large, etc. 8 * 2 - error on an I/O operation or fatal error condition. --- 65 unchanged lines hidden (view full) --- 74 * Columbus, OH 43221 75 * (614)451-1883 76 * 77 * 78 */ 79 80#ifndef lint 81static const char rcsid[] = | 1/* 2 * Chat -- a program for automatic session establishment (i.e. dial 3 * the phone and log in). 4 * 5 * Standard termination codes: 6 * 0 - successful completion of the script 7 * 1 - invalid argument, expect string too large, etc. 8 * 2 - error on an I/O operation or fatal error condition. --- 65 unchanged lines hidden (view full) --- 74 * Columbus, OH 43221 75 * (614)451-1883 76 * 77 * 78 */ 79 80#ifndef lint 81static const char rcsid[] = |
82 "$FreeBSD: head/usr.bin/chat/chat.c 102084 2002-08-19 03:07:56Z jmallett $"; | 82 "$FreeBSD: head/usr.bin/chat/chat.c 102412 2002-08-25 13:23:09Z charnier $"; |
83#endif 84 85#include <stdio.h> 86#include <ctype.h> 87#include <time.h> 88#include <fcntl.h> 89#include <signal.h> 90#include <errno.h> --- 1125 unchanged lines hidden (view full) --- 1216 char *s; 1217 1218 switch (n) { 1219 case '\r': /* ignore '\r' */ 1220 break; 1221 case -1: 1222 if (need_lf == 0) 1223 break; | 83#endif 84 85#include <stdio.h> 86#include <ctype.h> 87#include <time.h> 88#include <fcntl.h> 89#include <signal.h> 90#include <errno.h> --- 1125 unchanged lines hidden (view full) --- 1216 char *s; 1217 1218 switch (n) { 1219 case '\r': /* ignore '\r' */ 1220 break; 1221 case -1: 1222 if (need_lf == 0) 1223 break; |
1224 /* fall through */ | 1224 /* FALLTHROUGH */ |
1225 case '\n': 1226 write(STDERR_FILENO, "\n", 1); 1227 need_lf = 0; 1228 break; 1229 default: 1230 s = character(n); 1231 write(STDERR_FILENO, s, strlen(s)); 1232 need_lf = 1; --- 414 unchanged lines hidden --- | 1225 case '\n': 1226 write(STDERR_FILENO, "\n", 1); 1227 need_lf = 0; 1228 break; 1229 default: 1230 s = character(n); 1231 write(STDERR_FILENO, s, strlen(s)); 1232 need_lf = 1; --- 414 unchanged lines hidden --- |