Commit Graph

5630 Commits

Author SHA1 Message Date
Mark Murray
a440a601c1 This commit was generated by cvs2svn to compensate for changes in r100360,
which included commits to RCS files with non-trunk default branches.
2002-07-19 15:19:23 +00:00
Mark Murray
e07f5fa8bb Snapshot of NetBSD's (x)lint. Little functionality, just some code
tidy-ups.
2002-07-19 15:19:23 +00:00
Mark Murray
8bd89d7e04 s/inline/__inline/ 2002-07-19 14:12:27 +00:00
Mark Murray
d601abcf6c Merge from import. The import was done ages ago, and this diff has been
carried since then.
2002-07-19 14:10:35 +00:00
Mark Murray
bfc3d86a24 s/inline/__inline/ 2002-07-19 13:49:37 +00:00
Mark Murray
c279819e2e "inline" fixing. Replace "inline" with "__inline" to make more BSD
standard (and easier to define away with support in cdefs.h).
Also convert two function-like macros to static inline functions
for lint and the debugger.
2002-07-19 13:38:43 +00:00
Ruslan Ermilov
0b87f79976 s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
Ville Skyttä
0055e2cd0b Add myself.
Approved by:	knu (mentor)
2002-07-17 19:00:37 +00:00
Ollivier Robert
e74b0f7796 Fix installworld.
Submitted by:	Udo Schweigert <Udo.Schweigert@siemens.com>
2002-07-17 15:35:31 +00:00
Garrett Wollman
5cd19a3cfd A little bit more thought has resulted in a generic script which can
implement any of the useless POSIX-required ``regular shell builtin''
utilities, saving one frag and one inode each.  The script moves to
usr.bin/alias which is alphabetically the first of these commands.
2002-07-16 22:16:05 +00:00
Garrett Wollman
43bf47e4d8 Forgot to change command name in Makefile. (Where's the pointy hat?) 2002-07-16 21:14:01 +00:00
Garrett Wollman
b107f944ad POSIX requires these shell builtins to also exist as totally pointless
external commands.  Since they serve no useful purpose, it's OK that their
implementation is not the most efficient possible.
2002-07-16 21:13:11 +00:00
Kelly Yancey
9f8df4b468 Fix incorrect cast. 2002-07-16 05:57:21 +00:00
Dima Dorfman
7b9c3ba793 Use proper article. 2002-07-16 05:38:26 +00:00
Garrett Wollman
55a7bf6b44 Support POSIX ``programming environment'' mistake. 2002-07-15 22:51:24 +00:00
Ralf S. Engelschall
605a57c20d s/progname/procname/ to be consistent with the other occurrences
of the option -c argument in SYNOPSIS and DESCRIPTION.
2002-07-15 11:33:30 +00:00
Alfred Perlstein
e3d463662c revert WARNS=4, it makes the alpha compile sad. 2002-07-15 09:53:34 +00:00
Giorgos Keramidas
0d4ac71385 mdoc fun: add a few more sentence breaks. 2002-07-15 07:51:10 +00:00
Giorgos Keramidas
b4e164347b Kill excessive whitespace between macro arguments. 2002-07-15 07:35:36 +00:00
Giorgos Keramidas
2e634542d4 mdoc style: break up sentences 2002-07-15 07:16:54 +00:00
Juli Mallett
19074b91d3 Bit-width fields should be of type 'int'. 2002-07-15 06:57:25 +00:00
Juli Mallett
9739527ffb Use %zu to print size_t. 2002-07-15 06:57:01 +00:00
Giorgos Keramidas
3a432e4c4b Fix last hard sentence break. 2002-07-15 06:15:38 +00:00
Giorgos Keramidas
3fbfa86b4c ^Z suspends any and all programs that don't do anything special about
it.  There's really no reason to explicitly mention it here.

Suggested by:	Mark Valentine <mark@thuvia.demon.co.uk>
2002-07-15 05:54:35 +00:00
Tim J. Robbins
c81180b861 Support larger files (at least 64-bit offsets) by using off_t instead of
int to store offsets.
2002-07-15 05:31:55 +00:00
Juli Mallett
2c4acd2f49 Kill extraneous whitespace. 2002-07-15 02:15:12 +00:00
Giorgos Keramidas
c7a5e9a0a2 ^Z doesn't "stop" systat, but it "suspends" it.
PR:		docs/40489
Submitted by:	Dave McCammon <davemac11@yahoo.com>
2002-07-15 01:53:29 +00:00
Alfred Perlstein
da8de1e204 WARNS=4 2002-07-14 18:23:22 +00:00
Alfred Perlstein
d183dcb670 WARNS=4, add 2002-07-14 18:21:07 +00:00
Alfred Perlstein
12c9f2fd76 WARNS=2, de-__P() 2002-07-14 18:16:06 +00:00
Alfred Perlstein
651feb6587 WARNS=2 2002-07-14 17:55:35 +00:00
Alfred Perlstein
40ad88851b - TI-RPC is now the default again for code generation.
- As before, inetd support support is turned of per default.
  Code for inetd can be made with -I.

- Support for ``transport monitors'' and the NLSPROVIDER env
  variable is still there , even if their use is not clear in
  non TLI stream based systems like Free-/NetBSD. It can be activated
  with -P.

- There are a few corrections in rpcgen.1 and usage function to conform
  to the code. Added and documented -P

- I removed the #ifdefs checks for Free-/NetBSD since we are the only
  ones who use this code. MaxOS X may have the same limitations as
  we have, so this code will correctly build for them.

- Generate correct cflags.

Submitted by: mbr, Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
PR: bin/29175, misc/27816
2002-07-14 17:54:00 +00:00
Philippe Charnier
084e19802d The .Nm utility 2002-07-14 15:12:00 +00:00
Luigi Rizzo
8aed91ca2d Clear local screen when ^D is typed.
Use setproctitle to remove arguments from 'ps' output.

MFC after: 3 days
2002-07-14 14:08:43 +00:00
Andrey A. Chernov
91ebab1887 More Russian holidays
PR:		39578
Submitted by:	Sergey A. Osokin <osa@FreeBSD.org.ru>
2002-07-14 13:29:27 +00:00
Juli Mallett
010b4b09f1 Add a default case to the getopt(3) switch, remove a blank line nearby. 2002-07-14 02:34:37 +00:00
Juli Mallett
d1fea89cae Functions declared as <type> <identifier>(<nil>) should be declared as
<type> <identifier>(<void-type>) in ANSI C.
2002-07-14 02:03:23 +00:00
Juli Mallett
7b6f658ced Remove prototype for main(). 2002-07-14 02:00:45 +00:00
Juli Mallett
d2efbba584 Typo fixo: imbedded => embedded 2002-07-13 22:47:40 +00:00
Tim J. Robbins
a07af81154 Account for space used by environment variables in a similar way to
xargs(1) when handling -exec ... {} + constructions.
2002-07-13 08:08:46 +00:00
Ruslan Ermilov
7fe7d53b5c Make dirty, rotten hack really work. As of rev. 1.16, ${BINDIR}
is only defined after <bsd.prog.mk> is included, and .if make(1)
conditionals are evaluted on the first pass.

Spotted by:	Michael Bretterklieber <mbretter@jawa.at>
2002-07-12 14:49:25 +00:00
Joerg Wunsch
e97f67f532 Complete rewrite, once again.
This is basically a ``C compilation'' of the former whereis.pl file,
employing the same algorithms, and aiming at being mostly
UI-compatible to the old (legally tainted) 4.3BSD whereis(1).  In
comparision, the 4.4BSD-Lite version is just another variant of
which(1) only, where in particular the option to search for source
directories is sorely missing.

While i was at it, i added two more options which i contemplated doing
long since.  -x will suppress the run of locate(1) to find sources
that could not be found otherwise, potentially saving a lot of time
(but obviously, risking to not find some sources that are well hidden
in the tree).  -q will omit the leading name of the query, so in
particular, you can now do something like:

	cd `whereis -qs ls`

I'd explicitly like to thank johan for his review which was quite a
bit more than an average review, including sending me a lot of diffs.

Reviewed by:	johan
2002-07-11 21:20:54 +00:00
Bruce Evans
729cce8403 Set NO_WERROR to ignore the following warning which is emitted on
alphas:
    .../elf2aout.c:130: warning: cast increases required alignment of
    target type
The warning is about casting ((char *)e + phoff) to a struct pointer,
where e is aligned but phoff might be garbage, so I think the warning
should be emitted on most machines (even on i386's, alignment checking
might be on) and the correct fix would involve validation phoff before
using it.
2002-07-11 18:06:09 +00:00
Peter Wemm
40b5c1cf9f Bring getconf back in from the cold. 2002-07-11 07:28:21 +00:00
Dima Dorfman
046e2b07fa Correct a comment: Typing in the root password at the "Key:" prompt
doesn't (and shouldn't) work.
2002-07-10 04:05:33 +00:00
Dima Dorfman
d80646a4a0 Fix indentation: Don't use space where tabs will do; specifically,
don't use spaces at the beginning of a line where tabs are normally
used (the worst thing was that half of this file was right (tabs) and
half was wrong (spaces), making for painful reading).

Reviewed by:	/sbin/md5, diff -b
2002-07-10 04:03:33 +00:00
Andrey A. Chernov
831ab44e67 Remove tcsetpgrp() stuff across suspend/continue because it cause upper level
tcsh killed on resume (fg). It is because tcsh is interactive itself and
do its own things with terminal group.
2002-07-09 19:11:12 +00:00
Joerg Wunsch
bd275d1aed Add definitions for the industry-standard DLT density codes.
Obtained from:	Quantum DLT8000 manual
MFC after:	1 week
2002-07-09 11:26:09 +00:00
Joerg Wunsch
6038d8a3b9 The rate between EUR and USD has never been as large as our old value
(1.12) since the introductions as a common EU currency.  Anyway, since
the rate now seems to stabilize just around 1.00, fix up our value
here.

MFC after:	1 day
2002-07-09 08:47:03 +00:00
Johan Karlsson
7da9dccb66 Add ability to only beep when mail arrives.
comsat:
        only send two bell charecters if S_IXGRP is set and S_IXUSR is not.

biff:
        add new option 'b' to set S_IXGRP.

PR:             10931
Submitted by:   Andrew J. Korty <ajk@purdue.edu>
Approved by:    sheldonh (mentor)
MFC after:      1 month
2002-07-09 02:16:49 +00:00
Johan Karlsson
894429f29b Add DIAGNOSTICS section to describe exit values.
Approved by:    sheldonh (mentor)
MFC after:      1 week
2002-07-09 02:13:26 +00:00
Tim J. Robbins
dfb072f405 Make cspace()'s second argument const. Make `escapes' in lputs() const. 2002-07-08 06:00:55 +00:00
Tim J. Robbins
05018c64fd Silence WARNS=4 by passing a non-const buffer to regerror(). Since it
doesn't actually use the buffer when errbuf_size == 0, pass NULL.
2002-07-08 05:36:24 +00:00
Robert Drehmel
3b1320f9de Remove a debug output statement. 2002-07-07 15:29:00 +00:00
Robert Drehmel
e1e9c75605 - Fix the code in sbuf_need() to double the allocation size until
the new content size fits into the sbuf, instead of assuming
   that allocating twice the old size is enough.
 - Use memmove(3) rather than strcpy(3) to copy overlapping
   strings.

PR:		bin/39930
2002-07-07 15:24:36 +00:00
Mike Barcroft
0ad736e62b Don't depend on pollution in <limits.h> for the definition of
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
Tim J. Robbins
fa745288a7 Correct the History section; uniq(1) appeared at least as early as V3.
Move the section to after Standards.
2002-07-05 09:44:47 +00:00
Tim J. Robbins
898e5fd3f3 Remove redundant description of input_file and output_file arguments. 2002-07-05 09:37:34 +00:00
Tim J. Robbins
7dd4ac68f1 Use err instead of errx when malloc fails. "malloc" is not a helpful
error message.
2002-07-05 09:28:13 +00:00
Johan Karlsson
b68725e33f Restore copyright and RCSID.
Remove duplicate $FreeBSD$, $NetBSD$.

Submitted by:   mike
Approved by:    sheldonh (mentor)
2002-07-04 12:29:39 +00:00
Tim J. Robbins
54411faf6f Update another mention of <CR><CR> I missed the first time around (rev 1.2) 2002-07-04 05:16:19 +00:00
Johan Karlsson
e9a5542330 Reconnect whereis
Approved by:    sheldonh (mentor)
2002-07-03 19:23:50 +00:00
Johan Karlsson
b81a9775c7 Switch to c version
Approved by:    sheldonh (mentor)
2002-07-03 19:22:52 +00:00
Johan Karlsson
8d430958db compact synopsis
s/program [program ...]/program .../
        s/program [...]/program .../

Approved by:    sheldonh (mentor)
2002-07-03 19:20:59 +00:00
Johan Karlsson
058e185122 Remove -p flag.
OpenBSD's implementation lacks -p, and we don't want to
support the option now, only to lose it if/when we later
switch to OpenBSD's implementation.
This functionality is provided by which(1).

Approved by:    sheldonh (mentor)
2002-07-03 19:19:54 +00:00
Johan Karlsson
9d1b456e66 Add __FBSDID.
Remove __COPYRIGHT, __RCSID which caused an assembler warning.

Approved by:    sheldonh (mentor)
2002-07-03 19:17:59 +00:00
Johan Karlsson
b78dcb87c0 Change to NetBSDs version of whereis.
Approved by:    sheldonh (mentor)
Obtained from:  NetBSD
2002-07-03 19:16:31 +00:00
Johan Karlsson
5e3fde98fc Disconnect whereis while importing version from NetBSD
Approved by:  sheldonh (mentor)
2002-07-03 19:05:15 +00:00
Tim J. Robbins
bfed7b6485 Note that two carriage returns aren't required after entering the
initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$.

MFC after:	2 weeks
2002-07-03 14:42:53 +00:00
Tim J. Robbins
8523e9a677 Avoid checking whether each line is the last line of the file when we don't
need to know. Instead, check when we are trying to match a "$" address.
This does not change the way sed processes regular files, but makes it behave
more sensibly when used interactively.

PR:		40101
MFC after:	2 weeks
2002-07-03 14:38:27 +00:00
Tim J. Robbins
5a3232258e Don't let the pattern space become null if the `x' command is used when the
hold space is null; some functions assume it's never null.

MFC after:	3 days
2002-07-03 14:32:43 +00:00
Ruslan Ermilov
ff9a78c08e mdoc(7) police: added missing markup bits, lowercased argument names. 2002-07-03 12:24:11 +00:00
SUZUKI Shinsuke
80317922b5 fixed typo.
obtained from: KAME
MFC after: 3 days
2002-07-03 06:48:12 +00:00
Tom Rhodes
126aa65832 Fix grammar in 1 sentence
Reword 'Usually faster in most cases' to 'and is faster in most cases'

PR:	40024 (partly)
2002-07-02 21:13:15 +00:00
Ruslan Ermilov
8479adc1d3 Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
Provided the (previously missing) dependency on source files
for intermediate .msg files.

Provided the default for NLSSRCDIR (defaults to .CURDIR).

Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.

When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
Jonathan Mini
0830bd135e Add -g option, which restricts printing of the gecos fields to just the user's
real name.

PR:		bin/39462
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
Obtained from:	NetBSD
MFC after:	1 week
2002-07-02 08:00:20 +00:00
Juli Mallett
f201bc9c84 Back out my minorly disputed and possibly not well thought out changes to how
arguments are processed, at least temporarily.
2002-07-01 18:03:30 +00:00
Mark Murray
301777f2d2 Modernise; ISOify, use __FBSDID(), use headers instead of hand-declaring.
Fix easy warnings.
2002-07-01 16:40:33 +00:00
Johan Karlsson
16429f2c6c Add my DoB
Approved by:    sheldonh (mentor)
2002-07-01 16:02:05 +00:00
Tim J. Robbins
99a84ce108 Declare environ as char **environ like in environ(7), not char *environ[].
This corrects a problem whereby xargs could not walk the environment table
to count the amount of space it used, and treated it as if it were empty.
This problem was introduced in rev 1.15.

MFC after:	2 days
2002-07-01 03:21:05 +00:00
Juli Mallett
2ea0fdfb65 Nuke src/usr.bin/help in favor of projects/sccs/help (repo copied). 2002-06-30 23:31:21 +00:00
Juli Mallett
c948c0582c Minor cleanup: ANSI C function declarations, use argc after getopt(3) to check
for remaining arguments, rather than checking for *argv being a boolean truth.
Instead of using an empty case to check for -f- to mean "read stdin", and have
stdin reopned otherwise, use a FILE* for the mbox, and assign it to stdin when
we mean to use stdin, otherwise fopen(3).  Kill `register' qualifier.
2002-06-30 17:36:54 +00:00
Juli Mallett
549e1e057c Make it possible to have this (basename(1)) perform basename(3) on multiple
files.  The traditional behaviour, 'basename string .suffix', is preserved,
however a suffix may now also be specified via a getopt(3) option, -s, such
that if it is specified in that way, all string arguments follow.  There is
also a new flag, -a, which allows a user to say "yes, please basename(3) on
all arguments".  Update manual to reflect this unobtrusively.

Reviewed by:	obrien
2002-06-30 13:40:35 +00:00
David E. O'Brien
64567a4162 Consistently wrap CSRG SCM ID.
Requested by:	bde
2002-06-30 09:24:25 +00:00
Tim J. Robbins
721da592c4 Handle relative and absolute pathnames (anything with a `/' in it) in the same
way as execve(2), and the old perl which(1).

PR:		35718
2002-06-30 06:02:39 +00:00
Tim J. Robbins
8c821782f8 Treat empty PATH elements as "." for tradition and consistency with the
old Perl which(1) script.

PR:		35719
2002-06-30 05:48:50 +00:00
David E. O'Brien
77c8bf7cae Consistently use FBSDID 2002-06-30 05:34:21 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Juli Mallett
5cdd3a031f Untie help and sccs from the build. sccs has been repo copied into
projects/sccs/sccs/, to accompany projects/sccs/sccscmds, and help will
be dying shortly.

These programs will not be a part of 5.0-RELEASE, at least not in their
current form.  They'll either end up in src/contrib or ports.

Submitted by:	obrien
2002-06-29 22:45:44 +00:00
Tim J. Robbins
e12c2e18a5 Avoid truncating filenames with snprintf(). 2002-06-29 05:31:26 +00:00
Andrey A. Chernov
55f0377c44 Simplify TERM handling since now libutil not overwrites existen TERM for "term" 2002-06-28 22:56:31 +00:00
Tim J. Robbins
4633a1ab99 Refer to utilities, not commands, for consistency with env(1), nice(1), etc. 2002-06-28 09:34:46 +00:00
Tim J. Robbins
8b4f995acc Document the fairly obvious effects of the PATH environment variable. 2002-06-28 09:31:03 +00:00
Tim J. Robbins
6ec9d03768 Discourage use of env(1)'s "-" flag by moving its description to the
Compatibility section of the manual page.
2002-06-28 09:23:39 +00:00
Andrey A. Chernov
79a20d3b58 Overwrite "term" from login.conf(5) for any known TERM 2002-06-28 04:59:39 +00:00
Matthew Dillon
df151480c8 Add my entry to the mojo file. 2002-06-28 04:26:07 +00:00
CHOI Junho
d3900e1fed add my entry. 2002-06-28 01:42:45 +00:00
Juli Mallett
21e21aad32 Increment morefiles, balance braces. This should really be using getopt(3). 2002-06-27 21:11:19 +00:00
Juli Mallett
f63eec78e4 Instead of not using argc and doing other great evil, check for no arguments
in main() and print usage, or if there are too many arguments, handle that
there, too.
2002-06-27 21:01:32 +00:00
Juli Mallett
10b9342105 Update my name here, pointed out by grep(1). 2002-06-27 19:05:47 +00:00