aboutsummaryrefslogtreecommitdiff
path: root/toys
AgeCommit message (Collapse)Author
2019-05-25time: fix -v output.Elliott Hughes
Copy-and-paste mistake from the regular output. Bug: http://b/133502489
2019-05-25Move notify.c into portability.c (collate the #ifdefs), move global variablesRob Landley
into a structure passed as arguments, add x prefix to functions that can fail, add overflow test.
2019-05-25tail: support -f on BSD too.Elliott Hughes
Factor out the inotify code and add a kqueue equivalent. Specifically tested on macOS 10.14, but I assume this works for other BSDs too, given that I worked from the FreeBSD man page...
2019-05-25Toybox doesn't provide bzip2 or xz compression side (and the roadmap has it asRob Landley
out of scope), but the AOSP build airlock doesn't provide bzcat and friends. So tar needs to be able to use both: check for *zcat first, and fall back to "compressor -d" if it's not there.
2019-05-23tar: turns out --sparse is also known as -S.Elliott Hughes
Found trying to build the aosp_cf_x86_phone-userdebug target. The good news is that the targets that I knew were using tar with sparse files all pass now.
2019-05-20Less incomplete tar help text.Rob Landley
2019-05-19Fix tar sparse extract with extension blocks.Rob Landley
2019-05-19Fix tar --sparse generation of extension block.Rob Landley
2019-05-19Add pointless trailing --sparse entry for exact binary compartibility.Rob Landley
There's no possible use for this, but debian's tar produces it, so...
2019-05-19Add --sparse file creation support to tar.Rob Landley
And fix tar cv to produce output to stderr when archive going to stdout.
2019-05-17Fix a missing else, and an inverted test hidden by the missing else.Rob Landley
Add test to show failure case.
2019-05-16Have ps.c human_readable fields use all the available space.Rob Landley
2019-05-16Use the space reserved in the header to display more precision.Rob Landley
2019-05-16Add human_readable_long() for more than 3 digits of output.Rob Landley
2019-05-16Minor code shrink.Rob Landley
2019-05-14Checked in a debugging printf. Oops.Rob Landley
2019-05-14Typo caused a segfault. (Oops.)Rob Landley
2019-05-13Use FLAG() macros in lsRob Landley
2019-05-13Fix a couple error paths that don't continue archive create/extract properly.Rob Landley
2019-05-11Teach tar to extract type 'S' sparse file headers.Rob Landley
2019-05-10Walk -M /dir:/dir0:/dirN in man.makepost
Iterate over MANPATH and ordered sections using a manpath() helper equivalent of indenting logic of man x, man 1 x, and man -k each with a strsep loop.
2019-05-06Round allocation up to page size so s/x/yy/g thrashes less.Rob Landley
And remove a "nine princes in amber" themed name I missed.
2019-05-04Optimize s//g to avoid fresh strdup/free of entire line for each match.Rob Landley
Instead have one target string and fill it out from start to finish writing to each location once.
2019-05-01man: support MANPATH.Elliott Hughes
(This and `git clone` is how I use the latest man7.org pages all the time instead of my system's man pages.)
2019-05-01tar: use same tools for decompression as for compression.Elliott Hughes
This is what GNU tar does, so Android's build system jail allows bzip2, gzip, and xz, but not bzcat, zcat, and xzcat. Why the function? Because auto-detection works by setting toyflags, so we need to make sure we test the flags late, so it's either two copies of this or a function.
2019-04-30Make echo -E switch off -e.Rob Landley
2019-04-30echo: add -E.Elliott Hughes
POSIX finally gave us a way to use echo in a portable way despite differences of opinion about whether to default interpretation of escape sequences to on or off: -e enables and -E disables (as already implemented by busybox and coreutils). http://austingroupbugs.net/view.php?id=1222
2019-04-29Search name and first line with man -k regex.makepost
Exec -k value as regex on basename, and on the first content line outside a tag or on a referenced see-other, whichever appears earlier. Reuse zcat choice as a function when looping over files. Fix \-\- and glob.h include leftover. Handle man-pages example newlines. Clarify the todos, naming package and issue. Remaining items are more of a wishlist than a plan. Remove `<1>2` because it doesn't let `-k .` work, please look into that.
2019-04-26gzip: fix permissions perservation despite umask.Elliott Hughes
2019-04-26Add -M and switch test suite to use it (so test doesn't need to run as root).Rob Landley
2019-04-26Read .gz/.xz man pages and check sections in "man man" order.Rob Landley
2019-04-26gzip: fix regressions caused by 7964e1f78b58d9c365361cc36b0422d9d56cd204.Elliott Hughes
The permissions preservation test still fails for me, but that seems to be because my environment changed: it's failing because of my umask. I'll fix that in a separate patch, since it's unrelated.
2019-04-26more: better behavior with directories.Elliott Hughes
Also fix the non-tty output. Also tweak our output so the tests pass with TEST_HOST=1 too.
2019-04-26file: fix ELF note parsing.Elliott Hughes
Commit 9448c33944651c1644ffbd0f52cf9d43cae19599 broke ELF note parsing, because the bounds checking was off. Fix that but also generalize it so that we won't need note-specific bounds checking in future.
2019-04-22vi.c changes to vi cmd executionJarno Mäkipää
Reimplemented to command mode execution to follow vi cmd pattern. (REG)[COUNT0]{CMD}[COUNT1]<MOV>(SYM) Most of the moves can be executed intependently or before command, some require character after. (possibly with utf8) Some of the commands do not require move, such as D, J, dd, yy, x... There is also tons of special cases where move behaves differently depending on command. For example 1cw and 1ce appear to be the same but 1dw and 1de are not... Most of the operations still need reimplementing and lots of cleanup in order them to behave correctly refactored word move to work with utf-8
2019-04-22Ahem: _decompression_ is ready, compression isn't yet. Change defconfig y/n.Rob Landley
2019-04-21Promote gzip/zcat but keep gunzip default n until lib/deflate.c finished.Rob Landley
2019-04-21A little more cleanup on gzip.Rob Landley
2019-04-21Promote tar.Rob Landley
There's probably more to do, but it seems usable at this point.
2019-04-21Switch --to-command to use xsetenv() and fix a typo with -JRob Landley
2019-04-21man: WhitespaceRob Landley
2019-04-20Implement man.makepost@firemail.cc
To look up docs on my netbook and server. Practically deroff.1, with heuristic for where to put spaces and newlines. How would you simplify file resolution and bzcat? What have I got wrong when escaping slashes, because while \-\^\- is -- ok, \-\- becomes -\-, e.g. in git-pull.1?
2019-04-20Add xunsetenv() for the error checking.Rob Landley
2019-04-20New xsetenv() plumbing (repeatedly set same environment variables withoutRob Landley
leaking memory), and mod env command to test it.
2019-04-18Remove a line that's already in toys.h.Rob Landley
2019-04-18Add -J support for xzRob Landley
2019-04-18Ignore --line-buffered argument for script compatibility (it's the default).Rob Landley
2019-04-16Add argument to xflush() so it can test for stdout err without flushing.Rob Landley
2019-04-12Make help text spacing consistent.Rob Landley
2019-04-05Restore symlink times and add --restrictRob Landley