aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-07-03 19:10:42 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-07-03 19:10:42 +0200
commit9c46a0688576dd8c67d2fc24b68c07402da14fc8 (patch)
tree1dacd2f246a2010dd84f691c55b0d38bbcded093 /include/libbb.h
parent36ac283682bb176987c0c09e5f8c7e7e96fb1651 (diff)
downloadbusybox-w32-9c46a0688576dd8c67d2fc24b68c07402da14fc8.tar.gz
busybox-w32-9c46a0688576dd8c67d2fc24b68c07402da14fc8.tar.bz2
busybox-w32-9c46a0688576dd8c67d2fc24b68c07402da14fc8.zip
shell: update HISTFILESIZE code to be actually useful
"HISTFILESIZE=0" in profile wasn't working as intended, "unset HISTFILE" wasn't preventing creation of history files Now: HISTSIZE=n allows to reduce in-memory history buffer HISTFILESIZE=n allows to reduce history file size (0: truncate it) unset HISTFILE allows to not save history file at all function old new delta exitshell 138 194 +56 hush_exit 97 143 +46 save_history 266 296 +30 hush_main 1170 1186 +16 .rodata 105762 105771 +9 load_history 246 254 +8 size_from_HISTFILESIZE 44 41 -3 read_line_input 2746 2712 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/2 up/down: 165/-37) Total: 128 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 801f072fa..e765e18eb 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1989,7 +1989,7 @@ typedef struct line_input_t {
1989# if MAX_HISTORY 1989# if MAX_HISTORY
1990 int cnt_history; 1990 int cnt_history;
1991 int cur_history; 1991 int cur_history;
1992 int max_history; /* must never be <= 0 */ 1992 int max_history; /* must never be < 0 */
1993# if ENABLE_FEATURE_EDITING_SAVEHISTORY 1993# if ENABLE_FEATURE_EDITING_SAVEHISTORY
1994 /* meaning of this field depends on FEATURE_EDITING_SAVE_ON_EXIT: 1994 /* meaning of this field depends on FEATURE_EDITING_SAVE_ON_EXIT:
1995 * if !FEATURE_EDITING_SAVE_ON_EXIT: "how many lines are 1995 * if !FEATURE_EDITING_SAVE_ON_EXIT: "how many lines are