summaryrefslogtreecommitdiff
path: root/doc/history.0
diff options
context:
space:
mode:
Diffstat (limited to 'doc/history.0')
-rw-r--r--doc/history.030
1 files changed, 17 insertions, 13 deletions
diff --git a/doc/history.0 b/doc/history.0
index e3cba11..9133300 100644
--- a/doc/history.0
+++ b/doc/history.0
@@ -6,7 +6,7 @@ HISTORY(3) Library Functions Manual HISTORY(3)
history - GNU History Library
COPYRIGHT
- The GNU History Library is Copyright (C) 1989-2014 by the Free Software
+ The GNU History Library is Copyright (C) 1989-2017 by the Free Software
Foundation, Inc.
DESCRIPTION
@@ -206,7 +206,9 @@ HISTORY(3) Library Functions Manual HISTORY(3)
void add_history (const char *string)
Place string at the end of the history list. The associated data field
- (if any) is set to NULL.
+ (if any) is set to NULL. If the maximum number of history entries has
+ been set using stifle_history(), and the new number of history entries
+ would exceed that maximum, the oldest history entry is removed.
void add_history_time (const char *string)
Change the time stamp associated with the most recent history entry to
@@ -233,11 +235,12 @@ HISTORY(3) Library Functions Manual HISTORY(3)
Clear the history list by deleting all the entries.
void stifle_history (int max)
- Stifle the history list, remembering only the last max entries.
+ Stifle the history list, remembering only the last max entries. The
+ history list will contain only max entries at a time.
int unstifle_history (void)
- Stop stifling the history. This returns the previously-set maximum
- number of history entries (as set by stifle_history()). history was
+ Stop stifling the history. This returns the previously-set maximum
+ number of history entries (as set by stifle_history()). history was
stifled. The value is positive if the history was stifled, negative if
it wasn't.
@@ -246,25 +249,26 @@ HISTORY(3) Library Functions Manual HISTORY(3)
Information About the History List
- These functions return information about the entire history list or
+ These functions return information about the entire history list or
individual list entries.
HIST_ENTRY ** history_list (void)
- Return a NULL terminated array of HIST_ENTRY * which is the current
- input history. Element 0 of this list is the beginning of time. If
+ Return a NULL terminated array of HIST_ENTRY * which is the current
+ input history. Element 0 of this list is the beginning of time. If
there is no history, return NULL.
int where_history (void)
Returns the offset of the current history element.
HIST_ENTRY * current_history (void)
- Return the history entry at the current position, as determined by
+ Return the history entry at the current position, as determined by
where_history(). If there is no entry there, return a NULL pointer.
HIST_ENTRY * history_get (int offset)
- Return the history entry at position offset, starting from his-
- tory_base. If there is no entry there, or if offset is greater than
- the history length, return a NULL pointer.
+ Return the history entry at position offset. The range of valid values
+ of offset starts at history_base and ends at history_length - 1. If
+ there is no entry there, or if offset is outside the valid range,
+ return a NULL pointer.
time_t history_get_time (HIST_ENTRY *)
Return the time stamp associated with the history entry passed as the
@@ -492,4 +496,4 @@ HISTORY(3) Library Functions Manual HISTORY(3)
-GNU History 6.3 2015 May 24 HISTORY(3)
+GNU History 6.3 2017 October 8 HISTORY(3)