| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
|
|
|
|
| |
This removes the last index/rindex usage from /bin.
|
|
|
|
|
|
|
| |
This is intentionally undocumented for now since it's not part
of any standard.
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
Convert the tests to the perl prove format.
Remove obsolete TEST.README (results of an old TEST.sh for some old Unices)
and TEST.csh (old tests without correct values, far less complete than
TEST.sh).
MFC after: 1 week
|
|
|
|
| |
Approved by: rrs (mentor)
|
|
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
| |
Approved by: rrs (mentor)
|
|
|
|
| |
Also remove some local patches to diff(1) which are now unneeded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More precisely, this gives precedence to an interpretation not using the
'(', ')', '-a' and '-o' in their special meaning, if possible. For example,
it is now safe to write [ "$a" = "$b" ] and assume it compares the two
strings.
The man page already says that test(1) works this way, so does not need to
be changed.
Interpretation of input with more parameters tries a bit harder to find a
valid parse in some cases.
Add various additional test cases to TEST.sh.
PR: standards/133369
Approved by: ed (mentor)
|
|
|
|
|
|
|
| |
- not bumping a date as this is not a real content change
Approved by: ru
MFC after: 3 days
|
| |
|
|
|
|
| |
extend it with an example to clarify the point.
|
|
|
|
|
|
|
|
|
| |
"feature" doesn't seem to be in the standards or elsewhere, and
it is against what we are used to in C and sh(1), so put the
paragraph under BUGS.
Pointed out by: dougb
MFC after: 3 days
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
| |
Inspired by: SUSv3
MFC after: 1 week
|
|
|
|
| |
OK'ed by: imp, core
|
| |
|
|
|
|
|
|
|
|
| |
o Add argv[] boudary check.
PR: bin/40117
Reviewed by: silence on -audit
MFC after: 2 months
|
|
|
|
|
|
|
|
|
| |
the mtimes of a file. (This is probably only useful if you have
vfs.timestamp_precision set to something nonzero).
PR: 39163
Submitted by: Hal Burch <hburch@lumeta.com>
MFC after: 2 weeks
|
|
|
|
|
| |
PR: bin/40177
MFC after: 1 week
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove eaccess(2) absence workaround. Add eaccess(2) checks for FILRD,
FILWR, FILEX and FILEXIST cases.
We cannot MFC this because there is no eaccess(2) in -stable yet.
PR: bin/35076
Reviewed by: ru
Approved by: ru
|
|
|
|
| |
accept a NULL format string.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after making test(1) a sh(1) builtin; sh(1) coredumps when you run
something like this:
sh -c 'test ! `true 1`'
The cause is that the test(1) code totally depends on the presence of
two extra cells at the end of argv that are filled with NULL's. The
reason why the bug hasn't been exposed would be because the C startup
code kindly prepares argv with some extra zeroed cells for a program.
I know this is not the best fix, but since there are argv++'s without
boundary checks everywhere, I'd rather patch it up like this
(preparing a copy of argv with extra NULL's) for the moment.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o Change
int
foo() {
...
to
int
foo(void)
{
...
|
| |
|
|
|
|
|
| |
2) Catch "" to 0 conversion for OSes that not catch it in strto*()
(f.e. -stable). It is needed because POSIX agrees with both variants.
|
|
|
|
| |
errno from them allowed and it is always ERANGE
|
|
|
|
|
|
| |
set WARNS=0.
Reviewed by: mike
|
| |
|
| |
|
|
|
|
|
|
| |
Reported by: brian
- Call error() instead of errx() if compiled as sh(1) builtin.
|
|
|
|
|
|
|
|
|
|
|
| |
binary size increase is 3,784 bytes (about 0.6%).
I don't drop the printf builtin while I'm here because some /etc/rc.*
scripts seem to use it before mounting /usr where printf(1) resides.
Reviewed by: arch (sheldonh)
Inspired by: NetBSD, ksh
Clued by: ume (on how the printf builtin is used)
|
| |
|
|
|
|
|
|
|
| |
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
|
| |
|
|
|
|
| |
Submitted by: Mike Barcroft <mike@q9media.com>
|