aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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: improve test coverage.Elliott Hughes
Use a real .class file and add tests for the other formats that file(1) recognizes and we already have sample input in tests/files/.
2019-04-26file: add test ELF binaries.Elliott Hughes
We keep regressing on this, and the ELF stuff is quite complicated, so even though checking in binaries isn't my first choice, this seems like a good use of 20KiB...
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-23Remove librt, which is pulling in libpthread.Rob Landley
It hasn't been needed (for clock_gettime) since glibc 2.17 came out in December 2012 (which is more or less our 7 year support horizon) and Devuan 2.0 is not eliminating this with --as-needed (presumably due to some weak symbol nonsense), so... fix that bug.
2019-04-22struct deflate no longer lives in TT so must be explicitly zeroed, and useRob Landley
libbuf instead of toybuf in lib/
2019-04-22More TEST_HOST -> toyonlyRob Landley
2019-04-22Switch some SKIP_HOST tests to toyonly. (The host could be toybox.)Rob Landley
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-22And same flip in the airlock install.Rob Landley
2019-04-22Ahem: _decompression_ is ready, compression isn't yet. Change defconfig y/n.Rob Landley
2019-04-21Remove some commands from airlock install PENDING that are now in defconfig.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-21Forgot to check in the toys.envc declaration.Rob Landley
2019-04-21Shouldn't need clearenv() for macosx now we've got xclearenv.Rob Landley
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-18Why time based releases? (About the first half of it, anyway.)Rob Landley
2019-04-18Given dreamhost's tendency to repeatedly delete the mailing listRob Landley
web archives, link to another web archive as a backup.
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-16Call setlinebuf(stdout) from singleinit, so automatic flush each \n of output.Rob Landley
Commands that want something different can override this, but it seems like a fairly minor optimization and write(1) exists if we want to micromanage...
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-11scan_key: support more terminals.Elliott Hughes
Although we can get away with ignoring termcap/terminfo on the output side by restricting ourselves to generally-supported escape sequences, the input side is trickier because we need to support the sequences sent by common terminals. Luckily, this isn't is as bad as it sounds because only Home/End commonly differ. But it does mean we need a slightly different implementation to deal with the many-to-one mapping. Since we can't use TAGGED_ARRAY for this (without inflicting pain on all the callers) I've also switched to OR-ing in the modifier keys, so we have (say) KEY_UP|KEY_SHIFT rather than a separate KEY_SUP. This also generalizes better should we ever need to support multiple modifiers at once. To reduce the number of #defines, I've also switched from KEY_F1, KEY_F2, and so on to KEY_FN+1, KEY_FN+2, and so on. This isn't obviously necessary, and easily undone if we'd rather have move #defines in return for slightly more natural naming. To enable all this, I've inverted scan_key and scan_key_getsize so that scan_key_getsize is now the underlying function, and we don't waste all the top bits encoding width and height between scan_key and scan_key_getsize. Tested by pressing Home and End in hexedit in all of the terminals available to me.
2019-04-05Restore symlink times and add --restrictRob Landley
2019-04-05Minor tweaks and fix a bug with "tar cvzf tar.tgz" autodetecting when specified.Rob Landley
2019-04-05tar: Fix -ORob Landley
2019-04-05tar cleanup: Hook up --exclude to filter plumbingRob Landley
2019-04-04Add "toyonly" function to test suite.Rob Landley
2019-04-04Add decompressed version.Rob Landley
2019-04-04Tweak stat.Rob Landley
next_printf() shouldn't return null unless it never found the start of an escape sequence (it'll return a pointer to the null at the end of the string otherwise), and the only time we point it at a % and it doesn't is when it's %%. So handle that before calling. (Also, a single trailing % prints in other implementations, and while I'm there update to use FLAG() macros, add a couple comments, and only xflush() once per pattern.)
2019-04-04stat: avoid null dereference.liwugang
When the specified format string has odd '%' in the end, the next_printf function will return null. Checking the result value before using it. Signed-off-by: liwugang <liwugang@xiaomi.com>
2019-04-03More tar tests, and fix tar to pass them.Rob Landley
2019-04-03VI rewrote char delete and hjkl movementsJarno Mäkipää
Reimplemented basic cursor movements and char delete. In order to work more correctly with utf-8 data. x,h,j,k,l seems to work now with test data such as tests/files/utf8/test2.txt hjkl now accept count parameter so 1000j will scroll file 1000 lines relative move to bottom word movements w,e,b... still need to be still reimplemented in order to step correctly on utf-8 data
2019-04-03Autodetect gzip and bz2 for both compression and decompression.Rob Landley
2019-04-02Don't leak stdout pipe filehandle into children.Rob Landley
2019-04-02Yeah, ok, that one can get used uninitialized.Rob Landley
2019-04-02More tar cleanup, more tests.Rob Landley
2019-04-02Have xflush() only flush stdout (that's all it checks errors on),Rob Landley
and tweak a couple comments.
2019-04-02Fix a test that wasn't deterministic.Rob Landley
2019-04-02Don't emit random -EPIPE error messages in a pipeline, just exit silently.Rob Landley