diff options
Diffstat (limited to 'gnu/lib/libreadline/readline/history.h')
| -rw-r--r-- | gnu/lib/libreadline/readline/history.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/lib/libreadline/readline/history.h b/gnu/lib/libreadline/readline/history.h index 0041171f944a..72bdff9f7cb9 100644 --- a/gnu/lib/libreadline/readline/history.h +++ b/gnu/lib/libreadline/readline/history.h @@ -6,6 +6,14 @@ typedef struct _hist_entry { char *data; } HIST_ENTRY; +/* A structure used to pass the current state of the history stuff around. */ +typedef struct _hist_state { + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ +} HISTORY_STATE; + /* For convenience only. You set this when interpreting history commands. It is the logical offset of the first history element. */ extern int history_base; @@ -14,6 +22,12 @@ extern int history_base; just initializes the interactive variables. */ extern void using_history (); +/* Return the current HISTORY_STATE of the history. */ +extern HISTORY_STATE *history_get_history_state (); + +/* Set the state of the current history array to STATE. */ +extern void history_set_history_state (); + /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ extern void add_history (); |
