diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-23 06:33:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-23 06:33:37 +0000 |
commit | c0ea82a457410b46265cddc4883fbf9fcfdb2e24 (patch) | |
tree | 1e313bdded3760ddc00f8b585a215c2ef981ebbb /include | |
parent | ddbee974b4263a7089f18bdd02d79cfa708a4a22 (diff) | |
download | busybox-w32-c0ea82a457410b46265cddc4883fbf9fcfdb2e24.tar.gz busybox-w32-c0ea82a457410b46265cddc4883fbf9fcfdb2e24.tar.bz2 busybox-w32-c0ea82a457410b46265cddc4883fbf9fcfdb2e24.zip |
libbb: revent previous version of "concurrent history updating"
and replace it with one which does not "snoop" history written
by others. (1) it is what bug 185 needs, and (2) it is less bloaty:
function old new delta
load_history - 252 +252
read_line_input 3155 3287 +132
next_token 914 918 +4
qrealloc 36 33 -3
getoptscmd 713 708 -5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 388/-8) Total: 380 bytes
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 7bf9469cb..015374b4a 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1199,7 +1199,6 @@ typedef struct line_input_t { | |||
1199 | int cur_history; | 1199 | int cur_history; |
1200 | #if ENABLE_FEATURE_EDITING_SAVEHISTORY | 1200 | #if ENABLE_FEATURE_EDITING_SAVEHISTORY |
1201 | unsigned cnt_history_in_file; | 1201 | unsigned cnt_history_in_file; |
1202 | off_t last_history_end; | ||
1203 | const char *hist_file; | 1202 | const char *hist_file; |
1204 | #endif | 1203 | #endif |
1205 | char *history[MAX_HISTORY + 1]; | 1204 | char *history[MAX_HISTORY + 1]; |
@@ -1215,6 +1214,7 @@ enum { | |||
1215 | FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, | 1214 | FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, |
1216 | }; | 1215 | }; |
1217 | line_input_t *new_line_input_t(int flags) FAST_FUNC; | 1216 | line_input_t *new_line_input_t(int flags) FAST_FUNC; |
1217 | /* so far static: void free_line_input_t(line_input_t *n) FAST_FUNC; */ | ||
1218 | /* Returns: | 1218 | /* Returns: |
1219 | * -1 on read errors or EOF, or on bare Ctrl-D, | 1219 | * -1 on read errors or EOF, or on bare Ctrl-D, |
1220 | * 0 on ctrl-C (the line entered is still returned in 'command'), | 1220 | * 0 on ctrl-C (the line entered is still returned in 'command'), |