Commit Graph

5633 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
ca007d9172 Rewrite sockstat(1) in C.
Sponsored by:	DARPA, NAI Labs
2002-07-31 12:32:03 +00:00
Tony Finch
d1691a2ff6 Fix some bugs in in-place editing:
(1) errors from freopen were not reported correctly
(2) large files were not handled correctly
(3) read-only files broke things

MFC after:	1 week
2002-07-30 19:42:18 +00:00
Tim J. Robbins
0467aed3c9 Ignore leading semicolons on commands; required by SUSv3.
Obtained from:	NetBSD (kleink, Aymeric Vincent)
2002-07-30 14:07:30 +00:00
Tim J. Robbins
6e9c52b638 When translating and -C is specified, behave as if the complemented set was
in the locale collating order as required by SUSv3.
2002-07-29 23:42:00 +00:00
Tim J. Robbins
482711cfa6 When translating and the -c option is specified, handle the case where the
second string argument is more than one character in length in the way
required by SUSv3 (and the way GNU textutils and SVR4 do it).
2002-07-29 14:50:54 +00:00
Ruslan Ermilov
d2893b161b 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
Ruslan Ermilov
33c1de7d1f Ignore -C, -p, and -S options of install(1) when used with the -d
option.  Warn about COPY being phased out.  Restore the old method
of always comparing before installing: INSTALL="install -C".

Requested by:	bde
2002-07-29 08:51:04 +00:00
Dag-Erling Smørgrav
35945a74ac fetch(1) is WARNS-5 clean (tested on i386 and Alpha) 2002-07-28 21:09:57 +00:00
Dag-Erling Smørgrav
32411a1b6f Use strtol(3) instead of a home-grown version, and fix a "possibly
unitialized variable" warning.
2002-07-28 21:09:25 +00:00
David Malone
50bb77244e Add enough consts to keep everyone happy. 2002-07-28 16:23:28 +00:00
David Malone
81b4504baa Don't reuse a const char * when we really want a char *. 2002-07-28 16:17:38 +00:00
David Malone
91fbb9c1db Improve WARNS situation for kdump:
1) Define _KERNEL while including sys/time.h to get some function prototypes.
2) Add prototypes and ANSIify definitions.
3) Constness changes.
4) Remove register keyword.
5) Actually return a sensible value from main.
6) Make fread_tail take a void * instead of a char *.
7) Avoid a signedness warning by casting to a size_t. Should be safe
   enough 'cos we also check for nonnegativity.
8) Be extra chummy with sigset_t rather than passing a struct to printf
   and pretending it is an int.
2002-07-28 16:05:07 +00:00
David Malone
c10b37bf7a ANSIify function definitions to avoid a warning. 2002-07-28 15:50:38 +00:00
David Malone
8015edeebb The return value of snprintf should be always nonnegative, so it should
be safe to cast it to a size_t before comparing it to a sizeof().
2002-07-28 15:41:15 +00:00
David Malone
47e9e6a168 ANSIify function definitions to avoid a warning. 2002-07-28 15:32:17 +00:00
David Malone
19817b8518 ANSIify function definitions to avoid a warning.
Minor constness changes.
2002-07-28 15:28:38 +00:00
David Malone
823ab23f39 ANSify function definitions to avoid a warning. 2002-07-28 15:25:15 +00:00
David Malone
6ed42fb9d2 ANSIify function definitions to avoid a warning. 2002-07-28 15:22:43 +00:00
David Malone
b74c79078f ANSIify function definitions to avoid a warning.
PR:		38930
Submitted by:	keramida
2002-07-28 15:20:10 +00:00
David Malone
f2e8e0dad7 ANSIify function definitions to avoid a warning. 2002-07-28 15:13:17 +00:00
David Malone
a374d6e0a1 ANSIify function definitions to avoid some warnings.
Include stdlib.h for exit.
2002-07-28 15:02:24 +00:00
David Malone
412f8d5a03 ANSIify function definitions to avoid a warning.
Minor constness changes.
2002-07-28 14:55:59 +00:00
David Malone
77ae8ac713 ANSIify function definitions to avoid a warning. 2002-07-28 14:41:26 +00:00
Juli Mallett
afb325f75d Search the include path for the argument to -f, to make lives easier for
those of us who want to figure out how old Jim Mock is, but only want to
type 'calendar -f calendar.freebsd'.  This is done in a way that should
be totally backwards compatible with no noticable differences, at all.

Reviewed by:	mux
MFC after:	4 weeks
2002-07-28 13:46:09 +00:00
Dima Dorfman
16a8de73d2 Add a -v option that prevents switching virtual terminals while this
terminal is locked.  This permits the user to easily lock the entire
console from a single terminal.
2002-07-28 07:13:53 +00:00
Juli Mallett
716297c2d3 Print a warning when we are given two scripts for one target. This is neither
as wide-reaching nor intensive as NetBSD's similar, but the warning uses the
same text.

Inspired by:	NetBSD
2002-07-28 03:52:41 +00:00
Greg Lehey
76e27551b5 Clarify J.S. Bach's life: he was only born once, and he died in Leipzig.
Add entry for Antonio Vivaldi's death.
2002-07-28 00:42:02 +00:00
Warner Losh
a366365a74 Back out jmallett's realpath changes. They break a set of makefiles that
we use in sublte ways with relative paths.  Until they can be resolved,
back out these changes and put a big comment about why using realpath is
busted.

Approved by: jmallett
MFC After:  100 millifortnights
2002-07-26 21:50:36 +00:00
Tim J. Robbins
5b3df62e01 Use sigaction(2) instead of signal(3) to avoid the signal handler being
re-entered.
2002-07-26 05:25:12 +00:00
Johan Karlsson
103d66460c Define all paths in pathnames.h
Approved by:	joerg, sheldonh (mentor)
2002-07-25 23:04:31 +00:00
Tim J. Robbins
c0e3f1222f Give an example showing how to change the mesg status of terminals
other than the default one.

PR:		13073
2002-07-25 05:16:49 +00:00
Robert Drehmel
971b504bce style(9): - Put a space after the 'return' keyword.
- Wrap lines longer than 80 characters.
2002-07-24 18:54:59 +00:00
Robert Drehmel
4ca470d666 Use an ANSI-C function definition rather than a
K&R one to avoid a warning.
2002-07-24 18:39:51 +00:00
Robert Drehmel
5eb3a502f0 - Add a COMPATIBILITY section explaining that the default
behaviour of obtaining the affected terminal has changed.
 - Refer to the user's terminal instead of the current
   terminal session.
 - Tell the reader what the utility does when it is invoked
   without arguments.

Submitted by:		johan
2002-07-24 18:37:22 +00:00
Robert Drehmel
adf721d1cb Allow selection of the affected terminal using redirection
of standard input or standard output, like mesg(1) does.

Suggested by:	sheldonh
2002-07-24 15:48:17 +00:00
Johan Karlsson
8e4c33e9e7 Teach whereis(1) about games.
Approved by:	joerg, sheldonh (mentor)
2002-07-24 14:35:29 +00:00
John Polstra
f824b5187e Widen struct sockbuf's sb_timeo member to int from short. With
non-default but reasonable values of hz this member overflowed,
breaking NFS over UDP.

Also, as long as I'm plowing up struct sockbuf ... Change certain
members from u_long/long to u_int/int in order to reduce wasted
space on 64-bit machines.  This change was requested by Andrew
Gallatin.

Netstat and systat need to be rebuilt.  I am incrementing
__FreeBSD_version in case any ports need to change.
2002-07-24 03:02:43 +00:00
Tom Rhodes
a38d3fb35e Revert previous delta for cut(1) and calendar(1) as they were not applied
correctly.  My fault, forgot that -current was checked out.
2002-07-23 15:09:56 +00:00
Juli Mallett
58a8e6d20e Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU
compiler.
2002-07-23 14:39:20 +00:00
Ruslan Ermilov
95ad74d7cf Dependencies are delimited by space not tab. 2002-07-23 09:15:45 +00:00
Eric Melville
4d01a8fb5f Handle directories correctly.
PR:		40801
MFC after:	5 days
2002-07-23 04:54:57 +00:00
Tom Rhodes
31352a12bf Revert last commit. Sorry for breaking things 2002-07-22 21:45:16 +00:00
Tom Rhodes
623bc624b0 MFC: Fix some grammar, greater reduce diffs to HEAD 2002-07-22 21:14:16 +00:00
Hajimu UMEMOTO
3daa847108 add -4 and -6 option to be able to specify an address family.
Requested by:	matusita
MFC after:	1 week
2002-07-22 17:19:54 +00:00
Robert Drehmel
6863982a02 - Use MAXLOGNAME - 1 rather than UT_NAMESIZE.
- Remove the inclusion of <utmp.h>.
2002-07-22 11:36:25 +00:00
Robert Drehmel
6d6c6baac4 - Use MAXLOGNAME - 1 instead of UT_NAMESIZE.
- Do not pretend there is something like '/etc/utmp'.
2002-07-22 11:32:16 +00:00
Tim J. Robbins
c4232ceae7 Correct syntax error, remove the unescaped newline between "||" and the
command it is intended to test. pdksh and bash caught this syntax error,
sh(1) did not behave as intended.

PR:		40386
2002-07-22 05:35:59 +00:00
Ruslan Ermilov
2e9968fa36 Fixed improper SCRIPTS assignment that broke `clean'. 2002-07-21 21:03:47 +00:00
Johan Karlsson
da2dc5cc61 Only use one %s when there is only one argument to print.
Submitted by:	keramida
Approved by:	sheldonh (mentor)
2002-07-21 15:11:32 +00:00
Philippe Charnier
75863a6dbb Removal of spaces at EOL. Add __FBSDID. New function xmalloc, xrealloc,
xstrdup. There is a crash() function that do cleaning before exiting the
program. The new functions are wrappers that make use of crash() in case
of allocation failure. warn, exit -> err.

Reviewed by:	alfred
2002-07-21 12:55:04 +00:00