Re: Allow top(1) to search arguments (again)

2016-05-28 Thread Edd Barrett
On Wed, May 11, 2016 at 02:28:51PM +0200, Michal Mazurek wrote: > As discussed off list, "if (!term)" is redundant, as the caller does the > check. > > Also fix whitespace in some unrelated places. Can you split out the "term" change from style changes? You can do a KNF whack in a separate

Re: Allow top(1) to search arguments (again)

2016-05-11 Thread Ted Unangst
this improves the realloc loop. there is no need to constantly call realloc to resize the memory. if we have enough, we have enough. also no need to penny pinch the initial allocation. calling sysctl all the time is still wasteful, but harder to fix. Index: machine.c

Re: Allow top(1) to search arguments (again)

2016-05-11 Thread Michal Mazurek
As discussed off list, "if (!term)" is redundant, as the caller does the check. Also fix whitespace in some unrelated places. Index: usr.bin/top/display.c === RCS file: /cvs/src/usr.bin/top/display.c,v retrieving revision 1.50 diff

Re: Allow top(1) to search arguments (again)

2016-05-10 Thread Ted Unangst
Edd Barrett wrote: > On Thu, Apr 28, 2016 at 03:26:48PM +0100, Edd Barrett wrote: > > Resubmitting this diff, as I've been unable to get an OK. > > Style tweaks fixed, as pointed out by Michal Mazurek. Thanks for this. > > OK? ok

Re: Allow top(1) to search arguments (again)

2016-05-10 Thread Edd Barrett
On Thu, Apr 28, 2016 at 03:26:48PM +0100, Edd Barrett wrote: > Resubmitting this diff, as I've been unable to get an OK. Style tweaks fixed, as pointed out by Michal Mazurek. Thanks for this. OK? Index: machine.c === RCS file:

Allow top(1) to search arguments (again)

2016-04-28 Thread Edd Barrett
Hi, Resubmitting this diff, as I've been unable to get an OK. Original blurb: > I'd like top(1)'s filter feature (-g) to search process arguments. This > would make searching for (e.g.) Python scripts by name much easier. The > current behaviour only searches the program name, which for scripts