chat.c (3a7fc8ce5965f32b43428fe33fb1d0546fdbb782) | chat.c (93b0017f88462f9af15368440324aa3be58eb18f) |
---|---|
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. --- 1207 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; | 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. --- 1207 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 --- |