[Toybox] towards xzcat cleanup

2013-04-10 Thread Isaac Dunham
Hello, First, I'd like to thank Landley for explaining the ifconfig cleanup... Second, I have a small compile-tested patch that applies some of those points to the mess that is xzcat, and reduces its ifdef forest slightly. xzcat is still nearly 2kloc (per sloccount), and still contains far too

Re: [Toybox] towards xzcat cleanup

2013-04-10 Thread Rob Landley
On 04/10/2013 01:33:12 AM, Isaac Dunham wrote: Hello, First, I'd like to thank Landley for explaining the ifconfig cleanup... Yay! Glad it was useful. Would a similar description of the recent uuencode/uudecode cleanup help? That was fairly good code made tighter, so it's a less-obvious

Re: [Toybox] Towards find cleanup

2013-04-10 Thread Felix Janda
Hi Tim, thanks for your feedback. On 04/10/13 at 11:12am, Tim Bird wrote: ... The cleanup was mainly mechanical and I still don't understand the toy well. (Before and after the cleanup) there seems to be a problem with the rule parsing/interpretation. For example find . \( -type f

Re: [Toybox] Towards find cleanup

2013-04-10 Thread Tim Bird
On 04/10/2013 10:41 AM, Felix Janda wrote: Hello, attached is some cleanup of the find toy inspired by Rob's (very cool) mails on how he proceeds when cleaning up toys. (and Isaac's recent partial cleanup of xzcat) # HG changeset patch # User Felix Janda felix.ja...@posteo.de # Date

Re: [Toybox] Towards find cleanup

2013-04-10 Thread Felix Janda
Tim, thanks for your thourough review. Some (rather selective) comments: Regarding the == 0 vs ! thing: Maybe I was too eager here. I think that it does not make a great difference in readability but should be uniform along in all the toys. Grepping in toys/posix ! is used much more often but