summaryrefslogtreecommitdiff
path: root/lib/readline/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/history.c')
-rw-r--r--lib/readline/history.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/readline/history.c b/lib/readline/history.c
index e2d65ea5..4242f33e 100644
--- a/lib/readline/history.c
+++ b/lib/readline/history.c
@@ -44,12 +44,6 @@
# include <unistd.h>
#endif
-#if defined (HAVE_STRING_H)
-# include <string.h>
-#else
-# include <strings.h>
-#endif /* !HAVE_STRING_H */
-
#include "history.h"
#include "histlib.h"
@@ -349,19 +343,19 @@ stifle_history (max)
max_input_history = history_max_entries = max;
}
-/* Stop stifling the history. This returns the previous amount the
- history was stifled by. The value is positive if the history was
- stifled, negative if it wasn't. */
+/* Stop stifling the history. This returns the previous maximum
+ number of history entries. The value is positive if the history
+ was stifled, negative if it wasn't. */
int
unstifle_history ()
{
if (history_stifled)
{
history_stifled = 0;
- return (-history_max_entries);
+ return (history_max_entries);
}
-
- return (history_max_entries);
+ else
+ return (-history_max_entries);
}
int