Commit Graph

16 Commits

Author SHA1 Message Date
Pedro F. Giffuni
b948550d2f mail(1): Update more prototypes.
Also rename delete and undelete_messages to deletecmd and undeletecmd
respectively in an attempt to sync with other BSDs.

Obtained from:	OpenBSD
2016-07-15 15:37:54 +00:00
Pedro F. Giffuni
b22a869924 mail(1): Bring some fixes from other BSDs.
- Use varargs properly
- Use pid_t
- Better handling of error conditions on forked jobs.
- Some prototype and warning cleanups.

Obtained from:	NetBSD (some originaly from OpenBSD)
2016-07-13 16:45:26 +00:00
Pedro F. Giffuni
dde0f2bfd3 mail(1): check for out of memory conditions when calling calloc(3).
Suggested by:	oshogbo
MFC after:	3 days
2016-07-13 14:59:17 +00:00
Pedro F. Giffuni
d6f7a4fb17 mail(1): Invert calloc(3) argument order.
calloc(3) is documented to have first a number and then a size.

Obtained from:	OpenBSD (through NetBSD)
2016-07-10 02:46:20 +00:00
Philippe Charnier
6d8484b0d0 Add __unused. Ansi prototypes. 2010-12-19 16:25:23 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Mike Heffner
0077673e56 Add support for the 'flipr' option per IEEE 1003.1-2001. 2002-06-25 05:34:27 +00:00
Mike Heffner
856f23ed35 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
Mike Heffner
59c3f4f7ee 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
Mike Heffner
9ce73e9018 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
Mike Heffner
0c3a8314c0 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
Bruce Evans
22694ebad5 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
Joerg Wunsch
99bd6601d7 Teach boring old mail(1) about the use of the REPLYTO environment
variable which is de-facto standard for MUAs.

Teach bomail to generate an in-reply-to header so threading MUAs and
mail->news gateways won't lose context.

While i was at it, removed two gratuitous standard violations for
functions starting with an underscore.
1998-01-02 16:44:13 +00:00
Poul-Henning Kamp
d030d2d2ae Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00