aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
AgeCommit message (Collapse)Author
2010-04-16vi: code shrinkDenys Vlasenko
function old new delta vi_main 250 242 -8 colon 2980 2970 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-16vi: code shrink; save/restore errno in signal handlersDenys Vlasenko
function old new delta query_screen_dimensions - 54 +54 suspend_sig 50 64 +14 cont_sig 65 66 +1 catch_sig 42 32 -10 winch_sig 88 60 -28 edit_file 719 671 -48 refresh 848 767 -81 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/4 up/down: 69/-167) Total: -98 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26vi: fix NUM + "$" handlingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-11lineedit: fix another corner case with bad unicode inputDenys Vlasenko
function old new delta read_key 607 646 +39 readit 50 55 +5 getch_nowait 290 295 +5 hash_find 233 234 +1 xstrtoul_range_sfx 231 230 -1 passwd_main 1058 1056 -2 builtin_exit 45 43 -2 cmp_main 649 645 -4 lineedit_read_key 257 245 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/5 up/down: 50/-21) Total: 29 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28*: style fixes. no code changes (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-20fix fallout from isprint() changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18libbb: robustify isXXXX(). +39 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13*: use "can't" instead of "cannot"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02*: introduce and use ffulsh_all()Denys Vlasenko
function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22*: remove last function calls to isspaceDenys Vlasenko
function old new delta xstrtoul_range_sfx 232 231 -1 xstrtoull_range_sfx 295 293 -2 trim 82 80 -2 trim_trailing_spaces_and_print 57 52 -5 isspace 18 - -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08*: a few more NOINLINEsDenys Vlasenko
function old new delta print_linkinfo - 815 +815 do_msg - 783 +783 INET_setroute - 757 +757 varvalue - 746 +746 do_sem - 637 +637 inflate_codes - 617 +617 INET6_setroute - 491 +491 edir - 370 +370 sync_cursor - 298 +298 update_utmp - 246 +246 searchLines - 165 +165 setup_alarm - 144 +144 may_wakeup - 101 +101 getNum 566 371 -195 refresh 1166 848 -318 rtcwake_main 809 479 -330 getty_main 2396 1921 -475 chpst_main 1373 746 -627 inflate_unzip_internal 1335 567 -768 evalvar 1384 612 -772 ipaddr_list_or_flush 2160 1246 -914 route_main 1585 245 -1340 ipcs_main 2523 1049 -1474 ------------------------------------------------------------------------------ (add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23*: more portability fixes by Dan FandrichDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-04fix dependencies of FEATURE_GETOPT_LONGDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-15vi: do not accept uppercase comments (compat). Closes bug 397.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-17line editing: add an option to emit ESC [ 6 n and use resultsDenys Vlasenko
This makes line editing able to recognize case when cursor was not at the beginning of the line. It may also be adapted later to find out display size (serial line users would love it). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21*: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
2009-04-01trailing whitespace removalDenis Vlasenko
2008-11-24vi: speedup and code shrink (Walter Harms)Denis Vlasenko
networking/interface.c: silence warning (Vladimir) wget: more robust EINTR detection
2008-11-19vi: fix several instances of major goof: when text grows, text[]Denis Vlasenko
might get reallocated! We were keeping around pointers to old place... function old new delta colon 3017 3037 +20 char_insert 336 354 +18 stupid_insert 18 24 +6 string_insert 89 94 +5 do_cmd 4461 4465 +4 file_insert 328 329 +1 text_hole_make 134 120 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/1 up/down: 54/-14) Total: 40 bytes
2008-11-05*: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, ↵Denis Vlasenko
xx) op function old new delta tcsetattr_stdin_TCSANOW - 14 +14 set_sane_term 116 113 -3 top_main 1277 1273 -4 make_new_session 421 415 -6 rawmode 133 126 -7 reset_term 18 10 -8 die 43 35 -8 cookmode 62 54 -8 vlock_main 425 415 -10 read_line_input 3165 3155 -10 bb_askpass 357 347 -10 fsck_minix_main 3079 3065 -14 getty_main 2375 2332 -43 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
2008-10-29randomconfig fixesDenis Vlasenko
2008-10-29vi: fix uninitialized last_search_pattern (bug 5794)Denis Vlasenko
2008-10-25less: reuse former vi's key reading code. Improve SIGWINCH handling.Denis Vlasenko
function old new delta less_main 2056 2097 +41 getch_nowait 248 273 +25 read_key 310 321 +11 static.esccmds 61 69 +8 count_lines 72 74 +2 less_gets 166 142 -24 less_getch 172 43 -129 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/5 up/down: 91/-170) Total: -79 bytes text data bss dec hex filename
2008-10-25vi: move key reading routine out of vi into llbbbDenis Vlasenko
function old new delta read_key - 310 +310 .... static.esccmds 170 61 -109 readit 286 60 -226 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 9/10 up/down: 349/-367) Total: -18 bytes
2008-10-20vi: handle chars 0x80, 0x81... correctlyDenis Vlasenko
2008-10-19Comment and whitespace tweaks.Rob Landley
2008-10-18vi: explain why reading 4 chars is unsafeDenis Vlasenko
2008-10-18vi: whitespace fixDenis Vlasenko
2008-10-16vi: a few trivial optimizations to keyboard reading code; bump timeout to 50s.Denis Vlasenko
function old new delta edit_file 901 912 +11 count_lines 74 72 -2 readit 306 289 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 11/-19) Total: -8 bytes
2008-10-16Confirmed that on Linux the serial interrupt takes precedence over the timerRob Landley
interrupt, so we don't need to worry about scheduler delays. This means the delay can be trimmed down to 25 miliseconds. Add comment while at it.
2008-10-14vi: fix bizarre formatting. no code changesDenis Vlasenko
2008-10-14fix recurring "last_cmd overrun", fix [del] handling in insert modeDenis Vlasenko
2008-10-14vi: trivial size optimization -65 bytesDenis Vlasenko
2008-10-14vi: reinstate timeout of 300 msDenis Vlasenko
2008-10-14vi: add comments to Rob's algorithm of reading and matching ESC sequencesDenis Vlasenko
(nice work btw!)
2008-10-14Escape sequences sent over serial links don't come in as a block, so pollRob Landley
needs to pause a bit to make sure the next character has time to come in.
2008-10-14Clean up editors/vi.c:readit() so it only does readahead when actuallyRob Landley
parsing an escape sequence. (This mitigates but doesn't fully fix the the "cursoring around the file deletes data under qemu" bug, presumably due to "\033[D" being treated as three separate characters.)
2008-09-21crontab: do not destroy STDIN_FILENO, editor may need it (crontab -e)Denis Vlasenko
vi: deal with EOF/error on stdin and with input NULs function old new delta crontab_main 623 642 +19 edit_file 901 906 +5 readit 331 318 -13
2008-07-17vi: using array data after it fell out of scope is stupid.Denis Vlasenko
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-27vi: fix vda's thinkoDenis Vlasenko
2008-06-27*: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
2008-06-26print_flags: fix trivial thinkoDenis Vlasenko
vi: fix reversed checks for underflow
2008-06-24vi: fix yet another vda's thinkoDenis Vlasenko
2008-06-22vi: fix obvious thinko'sDenis Vlasenko
2008-06-22vi: fix vda's breakage (by Cristian Ionescu-Idbohrn)Denis Vlasenko
2008-06-21vi: small code shrinkDenis Vlasenko
function old new delta file_insert 328 329 +1 colon 3067 3064 -3 string_insert 93 89 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-7) Total: -6 bytes
2008-06-20vi: fix the bug where vi never grows the edit buffer.Denis Vlasenko
vi: do G trick on it function old new delta place_cursor 264 276 +12 next_tabstop 22 34 +12 mycmp 44 52 +8 status_line 34 40 +6 yank_delete 89 92 +3 what_reg 34 37 +3 suspend_sig 63 66 +3 find_range 493 496 +3 redraw 104 106 +2 cont_sig 63 65 +2 Indicate_Error 59 61 +2 status_line_bold 71 72 +1 file_insert 327 328 +1 vi_setops 1 - -1 ... cmdcnt 4 - -4 chars_to_parse 4 - -4 ccol 4 - -4 dot_scroll 88 79 -9 stupid_insert 28 18 -10 winch_sig 102 91 -11 char_insert 353 336 -17 readit 354 336 -18 get_one_char 128 110 -18 init_text_buffer 171 152 -19 text_hole_delete 132 112 -20 edit_file 940 918 -22 get_input_line 198 168 -30 show_status_line 449 408 -41 colon 3112 3067 -45 vi_main 312 250 -62 refresh 1077 974 -103 do_cmd 4818 4483 -335 ------------------------------------------------------------------------------ (add/remove: 0/38 grow/shrink: 13/20 up/down: 58/-889) Total: -831 bytes text data bss dec hex filename 809566 612 7044 817222 c7846 busybox_old 808794 611 6924 816329 c74c9 busybox_unstripped text data bss dec hex filename 18888 1 122 19011 4a43 busybox.t8/editors/vi.o 18116 0 0 18116 46c4 busybox.t9/editors/vi.o
2008-05-19- use STD*_FILENO some more. No object-code changesBernhard Reutner-Fischer
2008-05-18more -Wall warning fixes. -Wall is enabled now.Denis Vlasenko