Commit Graph

124 Commits

Author SHA1 Message Date
kevlo
67f40d0cd3 Remove unnecessary cast to pid_t. 2013-07-04 03:24:58 +00:00
dim
f4e7f0ad5a Fix undefined behaviour in usr.bin/mail/util.c.
Reported by:	deeptech71@gmail.com
MFC after:	3 days
2013-02-15 23:59:57 +00:00
ed
02dcf28b58 Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

	int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
2012-09-01 14:45:15 +00:00
eadler
336581c2f4 Fix likely race condition if wait_child() is interrupted by sigchild()
PR:		bin/102834
Submitted by:	Andreas Longwitz <longwitz@incore.de>
Approved by:	cperciva
MFC after:	2 weeks
2012-05-30 03:55:44 +00:00
kevlo
96dbfe4e2d fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
uqs
2b302aad9f Touch up some more small typos missed in the previous round.
Reported by:	Ben Kaduk <minimarmot@gmail.com> et al.
2012-01-05 21:36:45 +00:00
uqs
9953595f97 Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
dim
3aeee4ad81 In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
ptrdiff_t.  In usr.bin/mail/main.c, cast a field width to int.

MFC after:	1 week
2011-12-17 16:30:42 +00:00
ed
0bcfe62162 Replace __const by const in all non-contributed source code.
As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
2011-12-13 13:32:56 +00:00
maxim
8e6dc31ba7 o Fix -u flag description: it takes a username as an argument.
PR:		docs/153416
Submitted by:	Eitan Adler
MFC after:	1 week
2010-12-25 17:35:30 +00:00
charnier
f4859bef57 Add __unused. Ansi prototypes. 2010-12-19 16:25:23 +00:00
charnier
d91692bf4c Add __unused. Ansi prototypes. 2010-12-19 14:18:07 +00:00
joel
29af67e52c 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
uqs
9242c645f8 Move most of the remaining USD/PSD/SMM papers into share/doc 2010-12-04 10:11:20 +00:00
uqs
2053f035e3 mail(1) misses addresses when replying to all
There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook, eg.:
Cc: <foo@bar.com>,"Mr Foo" <foo@baz.com>

The following line now splits into the right tokens:
Cc: f@b.com,z@y.de, <a@a.de>,<c@c.de>, "foo" <foo>,"bar" <bar>

PR:		bin/131861
Submitted by:	Pete French <petefrench at ticketswitch.com>
Tested by:	Pete French
Reviewed by:	mikeh
MFC after:	2 weeks
2010-05-27 12:59:49 +00:00
ed
543b5e901b Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
ed
0de38335a4 Rename mail(1)'s aux.c to util.c.
The name `aux' is reserved on Windows file systems. aux.c in the mail(1)
directory contains some random utility functions. I'm renaming this file
to util.c to make it possible to check out this directory on Windows.

MFC after:	1 month
2009-01-16 15:00:30 +00:00
dds
5ea072fa21 Use static storage-class specifier where appropriate.
Found by: CScout
2007-11-08 11:13:03 +00:00
dds
bb2ff1033f Make function's definition follow its declared visibility.
Found by: CScout
2007-11-08 09:09:02 +00:00
maxim
f608810850 o Really commit typo fixes to HEAD.
PR:		docs/110809
Submitted by:	naddy
2007-03-25 18:37:59 +00:00
dds
8a7716f761 Document the TMPDIR environment variable.
MFC after:	1 week
2006-01-05 10:19:42 +00:00
yar
e5de7a52cb Sync usage screen with manpage.
MFC after:	5 days
2005-10-07 10:18:44 +00:00
yar
481c4ecdb9 Document the -d flag to mail(1) better, which comes handy when
you want to see, e.g., sendmail arguments mail(1) will use.

-H is not an independent flag, it's a modifier.  Also explicitly
say that -H will cause mail(1) to exit as soon as it prints the headers.

MFC after:	5 days
2005-10-07 10:16:41 +00:00
cperciva
afe2192571 Remove the dates from these files. They serve no purpose and result in
these files spuriously changing each time they are built.

Also, add $FreeBSD$ tags, because cvs is unhappy otherwise.
2005-08-17 15:56:04 +00:00
ru
7ef60504e6 Bumped document date.
Dealt with hard sentence breaks and whitespace at EOL.
2004-05-19 09:51:31 +00:00
mikeh
39dab43424 These aren't all binary options. 2004-03-09 01:20:24 +00:00
mikeh
97dc367f93 Assign checkmode boolean earlier to handle the goto jump.
Might fix PR bin/63769.
2004-03-06 13:27:59 +00:00
mikeh
9d29f488ff Add the -e (mail presence test), -H (header summary mode), and -F
(message save as first recipient) options for standards
conformance.

Submitted by:	Wartan Hachaturow <wart@tepkom.ru> (with some changes)
PR:		standards/61934
2004-02-29 20:44:44 +00:00
trhodes
9b883f99f1 Remove 2 more unused doc Makefiles. 2003-02-04 18:26:08 +00:00
mikeh
44c0edb0a0 The return-path is optional in a headline, therefore don't skip a
message if it is missing the return-path.

PR:		bin/40314 (slightly different patch)
MFC after:	2 weeks
2003-01-09 05:08:37 +00:00
mikeh
f4872a600d Correct a few more definitions, capitalize header fields consistently. 2003-01-09 03:36:47 +00:00
mikeh
8234c83805 Clarify ~. escape definition, remove duplicate entry, and shorten a
definition.
2003-01-09 01:14:54 +00:00
mikeh
139f1ec4fa Document the ~. and ~? command escapes. 2003-01-09 01:08:33 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
ru
a8adf98c82 Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
ru
cd7c90d38f s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
mikeh
034b3aea2d Add support for the 'flipr' option per IEEE 1003.1-2001. 2002-06-25 05:34:27 +00:00
mikeh
94e2e299e4 Use strcasestr() instead of reimplementing it. 2002-06-25 05:28:32 +00:00
mikeh
92912abb16 Make the 'searchheaders' option behave how it was supposed to. If
enabled, the string '/to:y' will match strings in the To, Cc, and Bcc
header fields. Whereas, '/To:y' will match only the To field. Edit the
manpage and a code comment to indicate the correct behavior.
2002-06-25 05:24:30 +00:00
mikeh
289920516b Rearrange a little, specifically:
- removed "Option string values" section and divided up amongst mail
  options and environment section
- expanded environment section
- rearranged mail options
- added default values to the mail options for clarification

Reviewed by:	ru
2002-06-25 05:16:11 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
imp
1698cb216e remove __P 2002-03-22 01:33:25 +00:00
bde
1108cb5744 #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
31d81e4fbc Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
charnier
0292afe82d Show arguments of command line options
Reviewed by:	ru
2002-01-22 19:49:48 +00:00
mikeh
774dd0c9ef 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
873c69d70d mdoc(7) police: oops, forgot about those interim XXX'es. 2002-01-10 14:27:04 +00:00
ru
dfa717614b mdoc(7) police: tidy up. 2002-01-10 14:25:34 +00:00