[patch] stty shrinkage [was: Re: busybox stty -echo]
Bernhard Fischer
rep.dot.nop at gmail.com
Mon Jan 15 08:06:42 PST 2007
On Mon, Jan 15, 2007 at 09:14:20AM -0500, Paul Albrecht wrote:
>On Sun, 2007-01-14 at 16:31 +0100, Bernhard Fischer wrote:
>> On Fri, Jan 12, 2007 at 04:46:33PM -0500, Paul Albrecht wrote:
>> >
>> >I typedef'ed int to smallint at the start of stty_main and the applet
>> >compiled cleanly.
>> >
>> >I tested "busybox stty -echo" with the updated busybox and it worked,
>> >that is, echoing was turned off, so your fix works for me.
>> >
>> >Thanks!
>>
>> Paul, all,
>>
>> May i ask you to test the attached patches?
>>
>> They were only compile tested but shouldn't do much harm, except,
>> perhaps the busybox.stty-01g-shrinkage.diff
>>
>> statistics:
>> text data bss dec hex filename
>> 6714 8 14 6736 1a50 stty.o.orig
>> 6599 8 14 6621 19dd stty.o.01b
>> 6599 8 14 6621 19dd stty.o.01c
>> 6599 8 14 6621 19dd stty.o.01d
>> 6517 8 14 6539 198b stty.o.01e
>> 6462 8 14 6484 1954 stty.o.01f
>> 6203 8 14 6225 1851 stty.o.01g
>> 6197 8 14 6219 184b stty.o.01h
>> 6197 8 14 6219 184b stty.o.01i
>>
>> ChangeLog:
>>
>> busybox.stty-01b-shrinkage.diff:
>> - reuse option_mask32 for state-handling in main
>> - improve check for errors from fcntl
>>
>>
>> busybox.stty-01c-shrinkage.diff:
>> - constify some read-only members and remove superfluous casts
>> (cleanup)
>>
>> busybox.stty-01d-shrinkage.diff:
>> - manually inline tty_value_to_baud and remove string_to_baud_or_die
>> (cleanup)
>>
>> busybox.stty-01e-shrinkage.diff:
>> - rewrite find_param to use index_in_str_array
>>
>> busybox.stty-01f-shrinkage.diff:
>> - peruse get_terminal_width_height and remove legacy code for ancient
>> slowaris versions.
>>
>> busybox.stty-01g-shrinkage.diff:
>> - merge display_changed() and display_all()
>>
>> busybox.stty-01h-shrinkage.diff:
>> - reuse return code of vsnprintf to avoid pulling in strlen
>>
>> busybox.stty-01i-shrinkage.diff:
>> - remove superfluous define that expanded to "!strcmp"
>> - remove some dead code
>>
>>
>> I will apply these patches to trunk in about a week unless somebody objects.
>>
>
>I tried applying the first patch and it failed. Here's the output:
>
>cd busybox-1.3.0
>patch -p0 < ../busybox.stty-01b-shrinkage.diff
it's against trunk, please retry with that.
thanks!
More information about the busybox
mailing list