Commit Graph

72 Commits

Author SHA1 Message Date
uebayasi
02829a8ca7 test(1): Compare timestamp in nsec scale in -nt/-ot. 2013-05-04 06:26:44 +00:00
wiz
dbb168824f - Remove unneeded consecutive argument in `.Nm' macros;
- rename `GRAMMAR AMBIGUITY' section to `CAVEATS', and move it to
  correct location;
- bump date.

From Bug Hunting.
2012-12-16 17:57:49 +00:00
joerg
66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
joerg
5bb1ddccc2 Use __dead 2011-08-29 14:51:17 +00:00
wiz
193ee60c7d Correct usage for parentheses, and mark up "expression" in more places.
From Bug Hunting in PR 42286.
2009-11-10 18:19:46 +00:00
wiz
fc61954d0b Remove leading zero in Dd argument. 2009-05-06 08:26:43 +00:00
jschauma
3ebf4f45cb Note that all file tests with the exception of -h and -L follow symbolic
links and thus evaluate the test for the file pointed at.
2009-05-05 19:04:01 +00:00
joerg
0feb17a4b1 Fix markup. 2009-04-12 13:52:20 +00:00
christos
2e63684c48 bin/39446: Aleksey Cheusov: always produce errors on empty numbers. 2008-09-10 19:00:51 +00:00
christos
afd857d440 make getn return long long to support large numbers on all archs. 2008-06-20 23:29:36 +00:00
christos
9655f5c24c PR/38755: murray armfield: /bin posix programs missing setprogname and/or
setlocale
2008-05-26 14:21:08 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
christos
3c769789fa PR/36534: Greg A. Woods: test(1) doesn't do -r and -w quite right
Use stat(2) instead of access(2) per POSIX.
2007-06-24 18:54:58 +00:00
simonb
9a8238c82f Remove a "CFLAGS+=-g" that seems to have snuck in with no good reason. 2007-06-22 03:24:16 +00:00
christos
35d9d3fddf Make sure we don't run over the end of the argument array while scanning
for input. This can happen if we have a unary not without an argument. When
we scan for the argument, we are already at the NULL element of the argument
array. Then when we scan ahead for a -a or -o, we end up testing the next
element after the NULL.
2007-05-24 18:47:08 +00:00
uwe
8e85c1baf1 Use the same wording for '-p' as for other file related tests. 2007-05-15 22:00:51 +00:00
christos
06519c05da PR/36092: B K: algorithmic inefficiency in bin/test/test.c:t_lex
test(1) scans for "operators" linearly in an array using strcmp() to
find a match. Since the list of "operators" is fixed, split them
into one and two character ones, and ones that start with a `-' and
ones they don't. This way we can optimize the compare function to
just check for one or two characters. Sort and use bsearch(3). We
could have used a single sorted array and bsearch(3), to save some
complexity, but I decided to be a bit fancier.
2007-03-28 01:47:25 +00:00
hubertf
7eef11b485 Revert previous (==) - not worth the trouble. 2006-09-24 13:24:08 +00:00
wiz
dff6308718 Bump date for previous. 2006-09-23 11:22:10 +00:00
hubertf
f9278bfbec Allow '==' as synonym to '=', just like our ksh and bash do.
This also affects the sh(1) builtin test command.
2006-09-22 22:15:24 +00:00
dbj
b41feff50f fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
  - change install to unconditionally remove its temporary file
    when installing hard links with -r.  This avoids problems when
    built with posix rename(2) semantics and reinstalling an existing
    hard link.
  - rework hard link targets in bsd.man.mk and bsd.links.mk
    to use makefile constructs instead of shell constructs
  - always reinstall hard links that may have case conflicts, even
    when MKUPDATE=yes, this ensures that they get added to METALOG
  - remove man pages which were hard linked to themselves in libform
  - remove improper hard link command for existing man page in libkrb5
  - fix libl's makefile to include bsd.lib.mk at end
  - remove shell quoting in link target for test's [.1 man page
2006-09-11 22:24:09 +00:00
christos
8c4dec8fa5 don't call get/set progname when we are a shell built-in. 2006-08-04 19:07:55 +00:00
christos
c338573fdf use getprogname() instead of argv[0], because some programs that execv, pass
the full path in argv[0] instead of just the basename. In reality, those
programs should be fixed (hello gdb for example).
2006-08-04 14:38:58 +00:00
simonb
dec70f4a29 KNF, use NULL instead of (type *)0. 2005-02-10 06:56:55 +00:00
agc
b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
wiz
14dfaa4b03 New policy: New sentences start on a new line.
Patches by Robert Elz <kre at munnari oz au>, with minimal changes by me.
2002-09-25 15:18:36 +00:00
wiz
10610e5a31 __STDC__ is always defined on NetBSD. 2002-05-25 23:12:16 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz
3ebcdc5e43 Whitespace nits. 2001-12-20 19:31:48 +00:00
wiz
4b238d257d Properly quote `[' as macro argument. 2001-10-17 21:14:45 +00:00
wiz
d3d81c4e84 Some KNF fixes by Petri Koistinen and me. 2001-09-16 19:03:26 +00:00
wiz
8cfb973b8e ANSIfy and slight KNF. Mostly #13594 by Petri Koistinen. 2001-07-30 10:17:41 +00:00
kleink
2caf6aacdd For commands and utilities, use EXIT STATUS rather than RETURN VALUES as
appropriate (and documented in mdoc(7)).
2000-09-04 07:30:07 +00:00
christos
e2e5d7bd40 - Enable test to be a shell builtin
- KNF
- Fix bug where test without arguments could access invalid memory
2000-04-09 23:24:59 +00:00
abs
98b54453f0 Remove duplicate 'string' / 's1' entry 1999-12-17 13:16:44 +00:00
kleink
900ca60345 Reverse the advice given to (now) prefer -h over -L; the former is defined in
1003.2bD3 and SVID4 and thus supposedly more portable.
1999-08-22 14:06:59 +00:00
kleink
e80c883c9d Operator precedence consistency; from "Andrew_L. Moore" <alm@SlewSys.Org>
in PR bin/7015.
1999-04-05 09:48:38 +00:00
garbled
1e1533cde9 the '[' wasn't being displayed properly as a command. Thanks to Charles
for the fix.
1999-03-09 07:05:33 +00:00
christos
9908eacfd6 char -> unsigned char 1998-11-04 20:12:12 +00:00
mycroft
ee9e50eacb Be more retentive about use of NOTREACHED and noreturn. 1998-07-28 11:41:40 +00:00
mrg
6be07a674c add missing .Nm calls and MLINKS. from spz@serpens.swb.de 1997-11-12 00:47:32 +00:00
mycroft
15de1c9fd2 Use S_IS*(), not S_IF*. 1997-10-19 17:54:18 +00:00
mycroft
c04eacd743 Fix format of description line. 1997-10-09 07:37:09 +00:00
christos
23edbe3557 Remove WARNS=1 from all the subdirectory Makefiles, and add it to Makefile.inc
now that all /bin has been cleaned.
1997-07-20 22:36:20 +00:00
christos
e028842ec8 Fix compiler warnings.
Add WARNS=1
1997-07-20 21:28:26 +00:00
mikel
a18d01ced0 add SYNOPSIS line for [; fixes PR bin/3705 1997-06-05 06:39:59 +00:00
tls
3e254367af kill use of register 1997-01-09 16:44:06 +00:00
pk
3c7b56e9b2 Note compatibility `-h' op. (from Rob Windsor; PR#1740) 1996-01-05 12:39:30 +00:00
cgd
a86f3aeda3 clean up Id's, and such. reorganize man page slight to match lite's org. 1995-03-21 07:03:50 +00:00
cgd
2c405cf3ed from jtc: insure that 3 and 4 argument special cases work properly. 1994-07-07 19:08:11 +00:00