Bash-4.4 patch 1
This commit is contained in:
parent
a0c0a00fc4
commit
8ddc8d6e3a
2 changed files with 6 additions and 2 deletions
|
@ -57,6 +57,8 @@ extern int errno;
|
||||||
/* How big to make the_history when we first allocate it. */
|
/* How big to make the_history when we first allocate it. */
|
||||||
#define DEFAULT_HISTORY_INITIAL_SIZE 502
|
#define DEFAULT_HISTORY_INITIAL_SIZE 502
|
||||||
|
|
||||||
|
#define MAX_HISTORY_INITIAL_SIZE 8192
|
||||||
|
|
||||||
/* The number of slots to increase the_history by. */
|
/* The number of slots to increase the_history by. */
|
||||||
#define DEFAULT_HISTORY_GROW_SIZE 50
|
#define DEFAULT_HISTORY_GROW_SIZE 50
|
||||||
|
|
||||||
|
@ -307,7 +309,9 @@ add_history (string)
|
||||||
if (history_size == 0)
|
if (history_size == 0)
|
||||||
{
|
{
|
||||||
if (history_stifled && history_max_entries > 0)
|
if (history_stifled && history_max_entries > 0)
|
||||||
history_size = history_max_entries + 2;
|
history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
|
||||||
|
? MAX_HISTORY_INITIAL_SIZE
|
||||||
|
: history_max_entries + 2;
|
||||||
else
|
else
|
||||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
||||||
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||||
looks for to find the patch level (for the sccs version string). */
|
looks for to find the patch level (for the sccs version string). */
|
||||||
|
|
||||||
#define PATCHLEVEL 0
|
#define PATCHLEVEL 1
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
#endif /* _PATCHLEVEL_H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue