Commit Graph

6 Commits

Author SHA1 Message Date
Denys Vlasenko
d54f58d487 hexedit: implement "[enter] goto offset" key
This is a must if you need to edit sector 123456789999 on your /dev/disk.

   text	   data	    bss	    dec	    hex	filename
 922745	    481	   6832	 930058	  e310a	busybox_old
 923023	    481	   6832	 930336	  e3220	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-14 10:51:12 +02:00
Denys Vlasenko
363fb5ec40 hexedit: restore screen on exit
function                                             old     new   delta
hexedit_main                                         998    1082     +84
restore_term                                           -      29     +29
remap                                                168     173      +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 118/0)             Total: 118 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-14 09:42:40 +02:00
Denys Vlasenko
d72e804e6d hexedit: optimize output buffering
function                                             old     new   delta
hexedit_main                                         970     998     +28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-14 00:04:16 +02:00
Denys Vlasenko
62643017c3 hexedit: implement page up/down
function                                             old     new   delta
hexedit_main                                         924     970     +46

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-13 23:02:51 +02:00
Denys Vlasenko
136946c3ea hexedit: smarter redraw
function                                             old     new   delta
format_line                                          197     209     +12
hexedit_main                                         930     924      -6
redraw_cur_line                                      104      94     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 12/-16)             Total: -4 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-13 21:38:55 +02:00
Denys Vlasenko
73af705628 hexedit: new applet
function                                             old     new   delta
hexedit_main                                           -     930    +930
format_line                                            -     197    +197
remap                                                  -     168    +168
move_mapping_further                                   -     141    +141
move_mapping_lower                                     -     107    +107
redraw_cur_line                                        -     104    +104
packed_usage                                       31802   31812     +10
applet_names                                        2688    2696      +8
applet_main                                         1552    1556      +4
applet_suid                                           97      98      +1
applet_install_loc                                   194     195      +1
------------------------------------------------------------------------------
(add/remove: 7/0 grow/shrink: 5/0 up/down: 1671/0)           Total: 1671 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-13 19:20:27 +02:00