BusyBox 1.11.0 man patch for "cat"
Jason Curl
jcurlnews at arcor.de
Sat Jul 5 09:02:40 UTC 2008
Denys Vlasenko wrote:
> On Friday 04 July 2008 09:55, Jason Curl wrote:
>> The diff is applied, generated with "diff -au source modified".
>>
>> So, I have
>> /share/man/cat1
>> /share/man/man1
>>
>> It searches first in the "cat" pages and if it isn't found, then searches in the "man" pages. I'm sure there could be some optimisations made....
>>
>
> I am applying your patch after fixing whitespace.
> I also discovered that it is not against current svn.
> Next time, please make a diff against svn, ok?
> --
> vda
>
>
I've checked your fix Denys and it also works (I don't get segfaults
anymore). I've taken the code from my second patch, checked it against
the latest snapshot and found I can reduce the size of man a bit more by
removing the two instances of the format string when generating the man
filename. I think the code is much more cryptic, but it's a small piece.
function old new delta
man_main 732 802 +70
show_manpage 111 - -111
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 70/-111) Total: -41
bytes
text data bss dec hex filename
1369158 2493 19292 1390943 15395f busybox_old
1369117 2493 19292 1390902 153936 busybox_unstripped
Thanks,
Jason.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: man.patch
Type: text/x-diff
Size: 1296 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080705/795ebbd6/attachment.bin
More information about the busybox
mailing list