aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
AgeCommit message (Collapse)Author
2019-07-31man: switch to xregcomp.Elliott Hughes
All regcomp callers are now going through xregcomp.
2019-07-24crontab: switch to getline().Elliott Hughes
2019-07-22Next round of plumbing evolution. Left in the todo and debug code this time.Rob Landley
2019-07-16ip.c route change support for extended attributes.Mike Bennett
This fixes the extended attribute settings for the ip route change command; extended attributes are collected in a separate buffer and added to the RTM message in a specific RTA_METRICS attribute. Only added setter support for the RTAX_MTU (per-route MTU), as that was the only option currently parsed. Also added support for displaying extended attributes, even those not currently settable.
2019-07-12diff: implement --strip-trailing-cr.Elliott Hughes
Used by some ART tests and also some LLVM tests. (The motivating example is the latter, but I noticed the former when looking for other users.) Bug: http://b/137298656
2019-07-12pidof: fix default behavior, add -x.Elliott Hughes
Before this patch, we're effectively doing `pidof -x` all the time. This patch changes names_to_pid() to allow us to say whether or not we want to include scripts, and adjusts the callers appropriately. Also add tests for `pidof` versus `pidof -x` which pass after this patch, without regressing the existing killall tests.
2019-07-11Next sh checkpoint. Not remotely load bearing yet.Rob Landley
2019-07-11bind/connect cleanup.Elliott Hughes
Rename the existing xbind/xconnect to xbindany/xconnectany, to make room for new xbind/xconnect that are more like 'x' versions of the regular bind and connect. Move explicit bind/connect callers over to xbind/xconnect. Of the affected commands, only netcat is actually used by Android. It was the most recent patch to netcat that made the lack of a more traditional xbind/xconnect apparent.
2019-07-10dd: iflags, oflags, fix ^C, fix the fundamental loop.Elliott Hughes
Investigating why the toybox tar tests fail on Android with toybox dd, I realized I was rewriting a part of dd I'd rewritten before! This is a re-send of my 2019-02-22 patch, rebased against the current ToT... This patch was originally motivated because after suggesting to the author of https://stackoverflow.com/questions/17157820/access-vdsolinux/54797221#54797221 that he could tell dd to work in bytes rather than blocks, I realized that our dd doesn't actually support that. But the rewrite of the main loop is necessary to fix the incorrect output from the dd calls in the tar test. Without this patch, `yes | dd bs=65536 count=1 > fweep` basically gives random output, based on how many bytes the pipe feels like giving you in your first read. (As far as I know, dd *without* bs= was fine, but I can't guarantee that that's true, just that I haven't seen it fail.) Also switch to TAGGED_ARRAY and comma_* for conv rather than add two more copies of an undesired idiom. It turned out -- contrary to the belief of cp(1) -- that comma_scan isn't suitable for this because of its magic handling of "no" prefixes. (It's actually harmless in cp because none of the --preserve options begin with "no", but some dd options do.) To this end, comma_remove is a less-magic comma_scan. I've also changed an `if` to a `while` because other implementations allow things like `--preserve=mode,mode` or `conv=sync,sync`. (If we decide this is a bug rather than a feature, we should at least fix the error message to be clear that we're rejecting the *duplication*, not the option itself.) I've also fixed the ^C behavior by simply adding a direct SIGINT handler rather than trying to be clever inside the read loop (which is why we weren't handling the SIGINT until the read returned). I've also removed `strstarteq` and just added the '=' to each literal when calling regular `strstart`. Plus basic tests.
2019-07-09dd: fix seek= on stdout.Elliott Hughes
2019-06-29More toysh flow control plumbing.Rob Landley
2019-06-25Start over on toysh.Rob Landley
Basic line continuation logic (to prompt with $PS2). Doesn't use result yet.
2019-06-24diff: fix diff of stdin for systems without /tmp.Elliott Hughes
xtempfile() alreay does the right thing, so switch to that. Also use xsendfile() for the actual copying. Fixes the cat tests on Android.
2019-06-21bc: fix a few bugs found in upstreamGavin Howard
2019-06-19Avoid a double-definition (iphdr) from netinet/in.h and linux/ip_tunnel.h by ↵Mike Bennett
locally defining the single constant definition ip.c uses (IP_DF) if not already defined.
2019-06-12bc: fix previous patchGavin Howard
I put the check into the wrong if. That was my bad. Again.
2019-06-11bc: fix a bug in powerGavin Howard
This bug is that an error should be returned when the user tries to take 0 to a negative power, since that is undefined, but bc would return 0.
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-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-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-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-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-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-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-18Add -J support for xzRob Landley
2019-04-16Add argument to xflush() so it can test for stdout err without flushing.Rob Landley
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-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-02Yeah, ok, that one can get used uninitialized.Rob Landley
2019-04-02More tar cleanup, more tests.Rob Landley
2019-04-02More tar cleanup and tests.Rob Landley
2019-04-01Silence spurious gcc "lnk cannot be used uninitialized" warning.Rob Landley
2019-04-01More tar cleanup.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-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
2019-03-27Silence another broken gcc "tar is never used uninitialized" warning.Rob Landley