aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2019-04-02Don't check in todo notes.Rob Landley
2019-04-02More tar cleanup and tests.Rob Landley
2019-04-02Help text tweak.Rob Landley
2019-04-01Silence spurious gcc "lnk cannot be used uninitialized" warning.Rob Landley
2019-04-01More tar cleanup.Rob Landley
2019-03-31Add "skipnot" function to test suite, skips next test if command line fails.Rob Landley
2019-03-31More tar cleanup, some tests.Rob Landley
2019-03-31More tar cleanup.Rob Landley
2019-03-29vi: bug fixesJarno Mäkipää
Style cleanups: Removing whitespaces at end of lines, hopefully reduces git am warnings Bug fixes: fix segfault if file did not exist, now creates one empty line fix insert mode text not showing on start of line fix append on empty line fix cursor move right on empty line
2019-03-28bc: add a trivial regression test for input from stdin.Elliott Hughes
A trivial test, but it would have caught the previous bug...
2019-03-28vi.c improved utf-8 supportJarno Mäkipää
Now calculates utf-8 rune width properly before trying to print on screen. works with test1.txt and test2.txt on tests/files/utf8 folder with 0x0300-0x036F combining chars Uses mbtowc and wcwidth to calculate width of rune. These both should be implemented on c runtime that conforms POSIX-1.2001. Different c runtimes might have different level of support to combining char ranges etc... I think there is no standard way to calculate utf-8 rune width without converting it first to widechar. And i think conversion to widechar just to calculate width is silly, since all write calls can be done with utf8 directly (on utf8 locales ofc), but in order to calculate them yourself without pointless conversion, one would need to write variable byte lookup array for binary searching weird ranges and make sure it works with big-endian systems too... By the way running ./watch ./cat tests/files/utf8/japan.txt does not print the text for some reason, but other test data does... I was checking how well original crunch_str works and noticed it. -Jarno
2019-03-27Skip file contents in error case.Rob Landley