aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-09-04 16:15:24 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-09-04 16:15:24 +0200
commite45af7ad17c3f0ecaec1d761aa89cb4fd83afbc2 (patch)
tree6f4a97cd2a4374cf152408976fd547b3fcd41d1c /libbb
parentbede215cf105377a1127532d2d710924cb58cc39 (diff)
downloadbusybox-w32-e45af7ad17c3f0ecaec1d761aa89cb4fd83afbc2.tar.gz
busybox-w32-e45af7ad17c3f0ecaec1d761aa89cb4fd83afbc2.tar.bz2
busybox-w32-e45af7ad17c3f0ecaec1d761aa89cb4fd83afbc2.zip
lineedit: remove SAVE_HISTORY bit, ->hist_file can be used as indicator
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 0786f9ae6..603bbfcae 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1402,8 +1402,6 @@ void save_history(line_input_t *st)
1402{ 1402{
1403 FILE *fp; 1403 FILE *fp;
1404 1404
1405 if (!(st->flags & SAVE_HISTORY))
1406 return;
1407 if (!st->hist_file) 1405 if (!st->hist_file)
1408 return; 1406 return;
1409 if (st->cnt_history <= st->cnt_history_in_file) 1407 if (st->cnt_history <= st->cnt_history_in_file)
@@ -1447,8 +1445,6 @@ static void save_history(char *str)
1447 int fd; 1445 int fd;
1448 int len, len2; 1446 int len, len2;
1449 1447
1450 if (!(state->flags & SAVE_HISTORY))
1451 return;
1452 if (!state->hist_file) 1448 if (!state->hist_file)
1453 return; 1449 return;
1454 1450
@@ -2188,7 +2184,7 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2188 state = st ? st : (line_input_t*) &const_int_0; 2184 state = st ? st : (line_input_t*) &const_int_0;
2189#if MAX_HISTORY > 0 2185#if MAX_HISTORY > 0
2190# if ENABLE_FEATURE_EDITING_SAVEHISTORY 2186# if ENABLE_FEATURE_EDITING_SAVEHISTORY
2191 if ((state->flags & SAVE_HISTORY) && state->hist_file) 2187 if (state->hist_file)
2192 if (state->cnt_history == 0) 2188 if (state->cnt_history == 0)
2193 load_history(state); 2189 load_history(state);
2194# endif 2190# endif