Re: [Toybox] [patch] add grep

2013-07-20 Thread Strake
Felix felix.ja...@posteo.de wrote: The *error_[msg,exit] functions should be used instead of [err,warn]x from err.h. These functions use xexit() instead of exit(). In xexit() calls exit() unless toys.rebound nonzero (e.g. when invoked from toysh) and in this case it long_jmps to

[Toybox] [PATCH] grep: cleanup, add -Hs

2013-07-20 Thread Isaac
toybox uses xexit and error_exit instead of the standard C approach; this allows toys to be called without starting a new process. toys.exitval is the return value on exit. loopfiles will read from stdin if nothing is specified. POSIX specifies that grep shall by default print the line when only

[Toybox] [CLEANUP] ifconfig commit 957

2013-07-20 Thread Rob Landley
http://landley.net/hg/toybox/rev/957 It's been a while. I got a bit blocked on get_sockaddr() cleanup, because although it's only ever called twice (once for ipv6 and once for ipv4), I don't understand what the addresses it's parsing should look like. For example, does local: apply to just

[Toybox] [CLEANUP] paste

2013-07-20 Thread Rob Landley
Description of the paste cleanup that accidentally got checked in during commit 944 because hg import -f has side effects. http://landley.net/hg/toybox/rev/944 (Yes, that commit description is actively ironic. Scroll down to patch.c.) Minor tweaks to the first loop: if -d isn't set then

Re: [Toybox] [PATCH] grep: cleanup, add -Hs

2013-07-20 Thread Isaac
On Sat, Jul 20, 2013 at 11:42:48AM -0500, Strake wrote: # HG changeset patch # User Strake # Date 1374338194 18000 # Node ID 24cd187521c1c89f16cddb9b346c1da7e900ecdd # Parent 1cf9c28012a76dd30cd1a7fcba8251b189d7df5a grep partly due to Isaac Dunham See inline comments below. diff -r

Re: [Toybox] [CLEANUP] paste

2013-07-20 Thread Felix Janda
Rob Landley wrote: Description of the paste cleanup that accidentally got checked in during commit 944 because hg import -f has side effects. http://landley.net/hg/toybox/rev/944 (Yes, that commit description is actively ironic. Scroll down to patch.c.) [...] The accidental