lex.c (126691) | lex.c (173439) |
---|---|
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 --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; 37#endif 38#endif /* not lint */ 39#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 --- 23 unchanged lines hidden (view full) --- 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; 37#endif 38#endif /* not lint */ 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/usr.bin/mail/lex.c 126691 2004-03-06 13:27:59Z mikeh $"); | 40__FBSDID("$FreeBSD: head/usr.bin/mail/lex.c 173439 2007-11-08 11:13:03Z dds $"); |
41 42#include "rcv.h" 43#include <errno.h> 44#include <fcntl.h> 45#include "extern.h" 46 47/* 48 * Mail -- a mail program 49 * 50 * Lexical processing of commands. 51 */ 52 | 41 42#include "rcv.h" 43#include <errno.h> 44#include <fcntl.h> 45#include "extern.h" 46 47/* 48 * Mail -- a mail program 49 * 50 * Lexical processing of commands. 51 */ 52 |
53const char *prompt = "& "; | 53static const char *prompt = "& "; |
54 55extern const struct cmd cmdtab[]; 56extern const char *version; 57 58/* 59 * Set up editing on the given file name. 60 * If the first character of name is %, we are considered to be 61 * editing the file, otherwise we are reading our mail which has --- 127 unchanged lines hidden (view full) --- 189 setptr(ibuf, mailsize); 190 setmsize(msgCount); 191 mailsize = ftello(ibuf); 192 (void)Fclose(ibuf); 193 relsesigs(); 194 return (msgCount - omsgCount); 195} 196 | 54 55extern const struct cmd cmdtab[]; 56extern const char *version; 57 58/* 59 * Set up editing on the given file name. 60 * If the first character of name is %, we are considered to be 61 * editing the file, otherwise we are reading our mail which has --- 127 unchanged lines hidden (view full) --- 189 setptr(ibuf, mailsize); 190 setmsize(msgCount); 191 mailsize = ftello(ibuf); 192 (void)Fclose(ibuf); 193 relsesigs(); 194 return (msgCount - omsgCount); 195} 196 |
197int *msgvec; 198int reset_on_stop; /* do a reset() if stopped */ | 197static int *msgvec; 198static int reset_on_stop; /* do a reset() if stopped */ |
199 200/* 201 * Interpret user commands one by one. If standard input is not a tty, 202 * print no prompt. 203 */ 204void 205commands() 206{ --- 327 unchanged lines hidden (view full) --- 534/* 535 * The following gets called on receipt of an interrupt. This is 536 * to abort printout of a command, mainly. 537 * Dispatching here when command() is inactive crashes rcv. 538 * Close all open files except 0, 1, 2, and the temporary. 539 * Also, unstack all source files. 540 */ 541 | 199 200/* 201 * Interpret user commands one by one. If standard input is not a tty, 202 * print no prompt. 203 */ 204void 205commands() 206{ --- 327 unchanged lines hidden (view full) --- 534/* 535 * The following gets called on receipt of an interrupt. This is 536 * to abort printout of a command, mainly. 537 * Dispatching here when command() is inactive crashes rcv. 538 * Close all open files except 0, 1, 2, and the temporary. 539 * Also, unstack all source files. 540 */ 541 |
542int inithdr; /* am printing startup headers */ | 542static int inithdr; /* am printing startup headers */ |
543 544/*ARGSUSED*/ 545void 546intr(s) 547 int s; 548{ 549 550 noreset = 0; --- 168 unchanged lines hidden --- | 543 544/*ARGSUSED*/ 545void 546intr(s) 547 int s; 548{ 549 550 noreset = 0; --- 168 unchanged lines hidden --- |