patch: add support for -R. ~ +110 byte. By Pascal Bellard <pascal.bellard AT ads-lu.com>

fbsplash: new applet by Michele Sanges <michele.sanges AT otomelara.it

function                                             old     new   delta
fbsplash_main                                          -    1525   +1525
fb_drawfullrectangle                                   -     118    +118
static.param_value                                     -     100    +100
packed_usage                                       23776   23872     +96
applet_names                                        1843    1852      +9
applet_main                                         1120    1124      +4
read_line_input                                     3156    3158      +2
applet_nameofs                                       560     562      +2
applet_install_loc                                   140     141      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 1857/0)           Total: 1857 bytes
   text    data     bss     dec     hex filename
 799233     641    7380  807254   c5156 busybox_old
 801202     641    7380  809223   c5907 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2008-03-26 13:32:30 +00:00
parent cc2965fd23
commit 08ec67bc62
7 changed files with 103 additions and 32 deletions

View File

@@ -958,14 +958,16 @@ static void load_history(const char *fromfile)
FILE *fp;
int hi;
/* cleanup old */
for (hi = state->cnt_history; hi > 0;) {
hi--;
free(state->history[hi]);
}
/* NB: do not trash old history if file can't be opened */
fp = fopen(fromfile, "r");
if (fp) {
/* clean up old history */
for (hi = state->cnt_history; hi > 0;) {
hi--;
free(state->history[hi]);
}
for (hi = 0; hi < MAX_HISTORY;) {
char *hl = xmalloc_getline(fp);
int l;
@@ -982,8 +984,8 @@ static void load_history(const char *fromfile)
state->history[hi++] = hl;
}
fclose(fp);
state->cur_history = state->cnt_history = hi;
}
state->cur_history = state->cnt_history = hi;
}
/* state->flags is already checked to be nonzero */