|
|
9014c4 |
From 8ddc8d6e3a3d85eec6d4ba9b9ed2bc36bce56716 Mon Sep 17 00:00:00 2001
|
|
|
9014c4 |
From: Chet Ramey <chet.ramey@case.edu>
|
|
|
9014c4 |
Date: Mon, 14 Nov 2016 14:26:51 -0500
|
|
|
9014c4 |
Subject: [PATCH] Bash-4.4 patch 1
|
|
|
9014c4 |
|
|
|
9014c4 |
---
|
|
|
9014c4 |
lib/readline/history.c | 6 +++++-
|
|
|
9014c4 |
patchlevel.h | 2 +-
|
|
|
9014c4 |
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
9014c4 |
|
|
|
9014c4 |
diff --git a/lib/readline/history.c b/lib/readline/history.c
|
|
|
9014c4 |
index 3b8dbc5..9ff25a7 100644
|
|
|
9014c4 |
--- a/lib/readline/history.c
|
|
|
9014c4 |
+++ b/lib/readline/history.c
|
|
|
9014c4 |
@@ -57,6 +57,8 @@ extern int errno;
|
|
|
9014c4 |
/* How big to make the_history when we first allocate it. */
|
|
|
9014c4 |
#define DEFAULT_HISTORY_INITIAL_SIZE 502
|
|
|
9014c4 |
|
|
|
9014c4 |
+#define MAX_HISTORY_INITIAL_SIZE 8192
|
|
|
9014c4 |
+
|
|
|
9014c4 |
/* The number of slots to increase the_history by. */
|
|
|
9014c4 |
#define DEFAULT_HISTORY_GROW_SIZE 50
|
|
|
9014c4 |
|
|
|
9014c4 |
@@ -307,7 +309,9 @@ add_history (string)
|
|
|
9014c4 |
if (history_size == 0)
|
|
|
9014c4 |
{
|
|
|
9014c4 |
if (history_stifled && history_max_entries > 0)
|
|
|
9014c4 |
- history_size = history_max_entries + 2;
|
|
|
9014c4 |
+ history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
|
|
|
9014c4 |
+ ? MAX_HISTORY_INITIAL_SIZE
|
|
|
9014c4 |
+ : history_max_entries + 2;
|
|
|
9014c4 |
else
|
|
|
9014c4 |
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
|
|
9014c4 |
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
|
|
9014c4 |
diff --git a/patchlevel.h b/patchlevel.h
|
|
|
9014c4 |
index 1cd7c96..40db1a3 100644
|
|
|
9014c4 |
--- a/patchlevel.h
|
|
|
9014c4 |
+++ b/patchlevel.h
|
|
|
9014c4 |
@@ -25,6 +25,6 @@
|
|
|
9014c4 |
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
|
|
9014c4 |
looks for to find the patch level (for the sccs version string). */
|
|
|
9014c4 |
|
|
|
9014c4 |
-#define PATCHLEVEL 0
|
|
|
9014c4 |
+#define PATCHLEVEL 1
|
|
|
9014c4 |
|
|
|
9014c4 |
#endif /* _PATCHLEVEL_H_ */
|
|
|
9014c4 |
--
|
|
|
9014c4 |
2.9.3
|
|
|
9014c4 |
|