Commit Graph

33 Commits

Author SHA1 Message Date
joerg
e7a0ec0f19 No trailing whitespace 2010-04-05 16:13:58 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
apb
4de4994446 Fix a bug in which which(1) would check only the first element of the
path for all args except the first.  So "which cp vi" found /bin/cp
using the first entry in the path, but failed to find /usr/bin/vi
using the second entry in the path, although "whereis cp vi" worked.
Restoring the ":" was done in the wrong place.

Also fix a bug in which an arg beginning with "/" would cause all
subsequent args to be ignored.  A "break" should have been "continue".
Add comments to all break and continue statements saying what they are
intended to do.

Also add braces around the body of a for loop which contained only one
multi-line statement.
2008-10-17 10:53:26 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
martin
ef30089df2 Apply patch from Michael van Elst to fix PR bin/34114:
which doesn't handle commands given as absolute pathnames.
2006-07-30 11:50:29 +00:00
christos
dbf34104b4 PR/25680: Christian Biere: whereis/which return invalid information with
huge path
2004-05-23 02:24:06 +00:00
christos
54c7540419 Set our uid and gid to the effective user and group id's of the current
process so that access(2) DTRT's (from Peter Postma).
2004-04-01 22:14:48 +00:00
christos
70b5dfe845 Resurrect which(1), blessed by core. 2004-04-01 21:41:37 +00:00
christos
60a197ff0e Fix const problem. 2004-04-01 21:41:14 +00:00
christos
745a6d0f0e - add which(1) functionality.
- fix bug where if a program appeared in more than one place it would
  erroneously exit(2)
- fix error messages to use err and errx as appropriate.
- made sure we don't pick up directories or non executable files.
2004-04-01 20:50:32 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
perry
df28067f6e Return non-zero exit status if the listed programs aren't found.
Submitted by Gabriel Gonzalez in PR bin/20984
I deviated from the patch by returning 2 if only some programs were
located and 3 if none were. The submitted patch returned 1 and 2,
respectively, and 1 is already used for general error.
2003-04-03 18:16:45 +00:00
itojun
f51456c273 err/errx/warn/warnx do not need \n at the end 2002-06-11 06:06:18 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
jdolecek
320186a83a add comma between xrefs in SEE ALSO 2000-07-16 22:05:46 +00:00
drochner
85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
garbled
9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
fair
4b94049c6c Add .Xr which 1 1999-03-11 11:40:10 +00:00
fair
64b1551844 Apply patch, KNF'd, from PR#3363 to add a "-p" option to whereis. 1999-03-11 10:42:43 +00:00
perry
34a98169f0 macroize BSD, NetBSD, FreeBSD and misc cleanup 1998-02-06 05:54:12 +00:00
lukem
e47862a2ec fix .Nm usage 1997-10-20 03:18:46 +00:00
mrg
9998247baa WARNSify; clean up .Nm usage 1997-10-20 02:22:55 +00:00
mikel
f5a8ade241 return 0 on successful exit, compare getopt() result to -1 instead of EOF. 1997-01-23 06:29:05 +00:00
tls
9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
jtc
be667101f6 Sync with 44lite2 1995-08-31 21:54:51 +00:00
mycroft
dd831dd13a 4.4-Lite version, slightly edited. 1994-09-18 02:14:32 +00:00
jtc
0ff865f224 Use <dirent.h> instead of <sys/dir.h>. 1993-12-04 01:08:35 +00:00
mycroft
e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft
c3e42d1c64 Add RCS indentifiers. 1993-08-01 07:22:47 +00:00
mycroft
d0f8d5d2bb Add RCS identifiers. 1993-07-30 22:28:22 +00:00
mycroft
2da3166a31 /usr/src/usr.lib --> /usr/src/lib, and add some /usr/src/gnu paths. 1993-06-22 00:53:15 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00