main.c (216370) | main.c (216564) |
---|---|
1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#endif /* not lint */ 35 36#ifndef lint 37#if 0 38static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/20/95"; 39#endif 40#endif /* not lint */ 41#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34#endif /* not lint */ 35 36#ifndef lint 37#if 0 38static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/20/95"; 39#endif 40#endif /* not lint */ 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/usr.bin/mail/main.c 216370 2010-12-11 08:32:16Z joel $"); | 42__FBSDID("$FreeBSD: head/usr.bin/mail/main.c 216564 2010-12-19 16:25:23Z charnier $"); |
43 44#include "rcv.h" 45#include <fcntl.h> 46#include "extern.h" 47 48/* 49 * Mail -- a mail program 50 * 51 * Startup -- interface with user. 52 */ 53 54static jmp_buf hdrjmp; 55 56extern const char *version; 57 58int | 43 44#include "rcv.h" 45#include <fcntl.h> 46#include "extern.h" 47 48/* 49 * Mail -- a mail program 50 * 51 * Startup -- interface with user. 52 */ 53 54static jmp_buf hdrjmp; 55 56extern const char *version; 57 58int |
59main(argc, argv) 60 int argc; 61 char *argv[]; | 59main(int argc, char *argv[]) |
62{ 63 int i; 64 struct name *to, *cc, *bcc, *smopts; 65 char *subject, *replyto; 66 char *ef, *rc; 67 char nosrc = 0; 68 sig_t prevint; 69 --- 230 unchanged lines hidden (view full) --- 300 exit(0); 301} 302 303/* 304 * Interrupt printing of the headers. 305 */ 306/*ARGSUSED*/ 307void | 60{ 61 int i; 62 struct name *to, *cc, *bcc, *smopts; 63 char *subject, *replyto; 64 char *ef, *rc; 65 char nosrc = 0; 66 sig_t prevint; 67 --- 230 unchanged lines hidden (view full) --- 298 exit(0); 299} 300 301/* 302 * Interrupt printing of the headers. 303 */ 304/*ARGSUSED*/ 305void |
308hdrstop(signo) 309 int signo; | 306hdrstop(int signo __unused) |
310{ 311 312 (void)fflush(stdout); 313 fprintf(stderr, "\nInterrupt\n"); 314 longjmp(hdrjmp, 1); 315} 316 317/* 318 * Compute what the screen size for printing headers should be. 319 * We use the following algorithm for the height: 320 * If baud rate < 1200, use 9 321 * If baud rate = 1200, use 14 322 * If baud rate > 1200, use 24 or ws_row 323 * Width is either 80 or ws_col; 324 */ 325void | 307{ 308 309 (void)fflush(stdout); 310 fprintf(stderr, "\nInterrupt\n"); 311 longjmp(hdrjmp, 1); 312} 313 314/* 315 * Compute what the screen size for printing headers should be. 316 * We use the following algorithm for the height: 317 * If baud rate < 1200, use 9 318 * If baud rate = 1200, use 14 319 * If baud rate > 1200, use 24 or ws_row 320 * Width is either 80 or ws_col; 321 */ 322void |
326setscreensize() | 323setscreensize(void) |
327{ 328 struct termios tbuf; 329 struct winsize ws; 330 speed_t speed; 331 332 if (ioctl(1, TIOCGWINSZ, (char *)&ws) < 0) 333 ws.ws_col = ws.ws_row = 0; 334 if (tcgetattr(1, &tbuf) < 0) --- 16 unchanged lines hidden --- | 324{ 325 struct termios tbuf; 326 struct winsize ws; 327 speed_t speed; 328 329 if (ioctl(1, TIOCGWINSZ, (char *)&ws) < 0) 330 ws.ws_col = ws.ws_row = 0; 331 if (tcgetattr(1, &tbuf) < 0) --- 16 unchanged lines hidden --- |