aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-31 13:16:52 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-31 13:16:52 +0200
commit2c4de5b045a79db73052d5b865474a00c9a87e99 (patch)
tree12a5c2c7a0685ab1674e6b07959688a3470359fd /include
parenta439fa93f64e6eb34f0633d00d203b4267d58521 (diff)
downloadbusybox-w32-2c4de5b045a79db73052d5b865474a00c9a87e99.tar.gz
busybox-w32-2c4de5b045a79db73052d5b865474a00c9a87e99.tar.bz2
busybox-w32-2c4de5b045a79db73052d5b865474a00c9a87e99.zip
ash,hush: optional support for $HISTFILESIZE.
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com) function old new delta size_from_HISTFILESIZE - 44 +44 hush_main 998 1025 +27 ash_main 1348 1374 +26 read_line_input 3361 3372 +11 new_line_input_t 17 24 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index c371e35f2..f2f3313b4 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1373,8 +1373,9 @@ void read_key_ungets(char *buffer, const char *str, unsigned len) FAST_FUNC;
1373 1373
1374#if ENABLE_FEATURE_EDITING 1374#if ENABLE_FEATURE_EDITING
1375/* It's NOT just ENABLEd or disabled. It's a number: */ 1375/* It's NOT just ENABLEd or disabled. It's a number: */
1376# ifdef CONFIG_FEATURE_EDITING_HISTORY 1376# if defined CONFIG_FEATURE_EDITING_HISTORY && CONFIG_FEATURE_EDITING_HISTORY > 0
1377# define MAX_HISTORY (CONFIG_FEATURE_EDITING_HISTORY + 0) 1377# define MAX_HISTORY (CONFIG_FEATURE_EDITING_HISTORY + 0)
1378unsigned size_from_HISTFILESIZE(const char *hp);
1378# else 1379# else
1379# define MAX_HISTORY 0 1380# define MAX_HISTORY 0
1380# endif 1381# endif
@@ -1384,6 +1385,7 @@ typedef struct line_input_t {
1384# if MAX_HISTORY 1385# if MAX_HISTORY
1385 int cnt_history; 1386 int cnt_history;
1386 int cur_history; 1387 int cur_history;
1388 int max_history; /* must never be <= 0 */
1387# if ENABLE_FEATURE_EDITING_SAVEHISTORY 1389# if ENABLE_FEATURE_EDITING_SAVEHISTORY
1388 unsigned cnt_history_in_file; 1390 unsigned cnt_history_in_file;
1389 const char *hist_file; 1391 const char *hist_file;