Commit Graph

80 Commits

Author SHA1 Message Date
bde
776196d0ee #include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.  Intentionally
don't follow the local style of polluting the local headers.
2002-02-25 05:16:22 +00:00
markm
fcaa25d991 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
charnier
9cf6dc8689 Show arguments of command line options
Reviewed by:	ru
2002-01-22 19:49:48 +00:00
mikeh
3680d484b2 Link mail(1) to mailx per POSIX. Mail(1) isn't 100% POSIX compliant,
but it is pretty close.

Not objected to by: -standards
2002-01-19 23:47:21 +00:00
ru
4587758606 mdoc(7) police: oops, forgot about those interim XXX'es. 2002-01-10 14:27:04 +00:00
ru
c907974179 mdoc(7) police: tidy up. 2002-01-10 14:25:34 +00:00
mikeh
526c5abf07 Fix comment. 2001-12-23 06:12:41 +00:00
mikeh
151204c5ac Add support for ~_, ~x, ~i, ~a, ~A, ~<, and ~r! tilde-escapes. Improve
tilde-escapes documentation.

Mostly obtained from:	NetBSD
2001-12-22 22:16:48 +00:00
ache
6887b2b8d7 Add missing {} to 'for'. It fix coredump (result of NetBSD changes merge) 2001-12-19 22:25:11 +00:00
ache
0fa523684f Add (unsigned char) cast to ctype macros
ftell->ftello, fseek->fseeko
File 'newsize' type int->off_t
Add visible (long) cast to fsize() when it called to small one message file and
result is assigned to long.
2001-12-19 21:50:22 +00:00
mikeh
a1397bf9d2 Sync with most of NetBSD's changes, including:
*) Sync with 4.4BSD-Lite2
 *) Set usecs for utimes()
 *) Add 'inc' command and 'autoinc' option that check for new mail
    manually and automatically, respectively
 *) Use POSIX signal handling and tty semantics
 *) Handle long lines correctly when paging messages
 *) Add ability to explicitly search 'To:' line
 *) Various manpage cleanups
 *) Support overriding '~/.mailrc' with $MAILRC
 *) Support 'askbcc' and 'asksub' options
 *) Fix various bugs

Reviewed by:	ru (mail.1)
Obtained from:	NetBSD
2001-12-18 20:52:09 +00:00
ru
397ee770f9 Install files via FILES. 2001-12-17 16:02:15 +00:00
mikeh
47c45104df I'm working on cleaning this up, however it probably won't be done for
awhile. Turn off WARNS so that this doesn't break the build when WARNS
is turned on higher up. Also add $FreeBSD$.
2001-12-12 15:42:19 +00:00
mikeh
83e9fffd73 Don't add space after comma unless there was already one (prevents a
rare overflow). Optimize loop slightly. Don't exit if realloc can't
shrink a buffer (just continue and use the larger buffer).

Obtained from:	OpenBSD
MFC after:	2 weeks
2001-09-23 04:07:26 +00:00
ache
1d79cd2559 File positions are off_t nowdays, not long, so:
fseek -> fseeko
    ftell -> ftello

    NOTE: fseek/ftell not works for >long offsets per POSIX:

    [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
    cannot be represented correctly in an object of type long.

    [EOVERFLOW] For ftell ( ), the current file offset cannot be represented
    correctly in an object of type long.
2001-09-02 14:40:51 +00:00
brian
31ae506fa1 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 14:46:40 +00:00
ru
325db7b385 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
ru
9174553bc8 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
dd
7d1013753f Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
ecbb298b07 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
c8794ee0e0 mdoc(7) police: fixed formatting bugs in rev. 1.27. 2001-07-05 06:27:52 +00:00
mikeh
94f253f5ac Add the -E flag to not send messages that have an empty body. This is
useful for piping cron script error output by mail.

PR:		bin/9494
Obtained from:	NetBSD
MFC after:	2 weeks
2001-06-28 02:40:07 +00:00
dd
9f9a695939 Nuke unused variables. 2001-06-24 23:41:57 +00:00
mikeh
7ff2b28543 Support mail boxes that have dates without seconds (SysV) and those
that have a timezone as <-|+>nnnn (eg. imapd).

PR:		bin/11746
Obtained from:	OpenBSD
MFC after:	2 weeks
2001-06-18 04:28:03 +00:00
mikeh
fd3115cdf2 Respect REPLYTO in mailrc.
PR:		bin/8322
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
MFC after:	2 weeks
2001-06-14 01:08:30 +00:00
mikeh
e34cee4b85 Cleanup mail(1)'s varying styles by converting to using style(9).
Also take a stab at cleaning up BDECFLAGS and convert all uses of
NOSTR, NIL, NONE, NOVAR, NOGRP, NOGE to NULL. Also kill 'register' to
get diffs somewhat closer to OpenBSD/NetBSD.

There are no functional changes however.
Reviewed by:	nra (visual inspection)
2001-05-27 20:26:22 +00:00
mikeh
84f7751c4b Allow mail(1) to be able to read Eudora mailboxes by transforming
lines that end in <CR><LF> to just <LF>.

Reviewed by:	imp
Obtained from:	OpenBSD
2001-05-11 03:07:11 +00:00
mikeh
f425ed489c Merge various changes from OpenBSD and NetBSD.
o remove panic() in favor of err(3) and use err(3) functions
  consistently throughout
o use stat(2)'s S_IS* macros rather than S_IF*
o [r]index -> str[r]chr
o convert some static buffers to dynamic ones
o use real tempfiles rather than reopening the same templates
o rename some functions that clash with libc
o convert wait_status from union to int and use wait(2) status macros
o fix multiple potential buffer overflows
o fix a few comments
o add $FreeBSD$

Reviewed by:	nra, nectar (earlier version)
2001-03-25 04:57:05 +00:00
ru
0b7f07b8e5 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
ru
b1c3961564 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
ru
cd914ddc3c mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
ru
655e7db87e Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
c47f5626c2 Eliminate groff(1) warnings. 2000-11-29 10:56:59 +00:00
kris
8e4d14f1a5 *** empty log message *** 2000-11-27 06:55:38 +00:00
ru
0957874304 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
ru
f9c7198049 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
phk
d83af97ba0 Add $FreeBSD$
Rename local offsetof() macro to boffsetof() to avoid clashing with
the offsetof() from <stddef.h>
2000-10-24 13:54:31 +00:00
gshapiro
b91094c561 Complete migration of aliases file to /etc/mail/aliases.
The maintainers of share/examples/diskless/README.TEMPLATING and mergemaster
have been contacted so those may be updated as well.
2000-08-13 18:38:58 +00:00
imp
8e96f07683 #include <errno.h> where needed. Kill extern int errno;.
Minor warnings in tip corrected.
2000-04-14 06:39:19 +00:00
sheldonh
d39e57413d Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
jkoshy
20ff6eb5f4 Document startup behaviour of mail(1).
PR:		docs/1577
Submitted by:	Joseph Koshy <koshy@india.hp.com>
1999-11-08 03:54:37 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
jmz
153ac8544a Ignore the MAIL environment variable when the -u flag is set.
PR:		bin/8665
1999-05-20 22:23:04 +00:00
simokawa
35561f04bb Allocate aligned memory according to sizeof(char *).
Approved by: jkh
Obtained from: NetBSD
1999-01-13 10:37:22 +00:00
bde
fb38f3b38f vfork -> fork. The child calls abort(), which calls stdio. 1998-10-10 19:21:39 +00:00
bde
b6707d5d72 vfork -> fork. This home made popen() had the same bug as the library
popen(), but worse.  The child calls execvp(), which calls malloc()
a bit more than execl(), and it calls non-library functions that call
malloc() and who-knows-what else (stdio is called in at least some
error cases).
1998-10-10 19:18:30 +00:00
bde
85a8445364 Fixed gross breakage in previous commit. The malloc sizes for the
temporary file names were uninitialized if TMPDIR was set and 1 too
small otherwise.

Fixed style bugs in previous commit.

Fixed missing checks for malloc failure in previous commit.

Report malloc failure consistently, at least in temp.c.
1998-10-10 19:01:47 +00:00
bde
f9d228be4a Removed debugging cruft.
Broken in:	previous commit
1998-10-10 18:37:02 +00:00
thepish
7e13cb17ff PR: bin/8250
protect against buffer overruns in mail temporary files.
1998-10-10 09:58:20 +00:00
jkoshy
be7e5066f8 Move setting of 'crt' mail variable to {/usr/src}/etc/mail.rc. 1998-08-31 10:53:06 +00:00