[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.3.2 History List Management
These functions manage individual entries on the history list, or set parameters managing the list itself.
- Function: 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
.
- Function: void add_history_time (const char *string)
Change the time stamp associated with the most recent history entry to string.
- Function: HIST_ENTRY * remove_history (int which)
Remove history entry at offset which from the history. The removed element is returned so you can free the line, data, and containing structure.
- Function: histdata_t free_history_entry (HIST_ENTRY *histent)
Free the history entry histent and any history library private data associated with it. Returns the application-specific data so the caller can dispose of it.
- Function: HIST_ENTRY * replace_history_entry (int which, const char *line, histdata_t data)
Make the history entry at offset which have line and data. This returns the old entry so the caller can dispose of any application-specific data. In the case of an invalid which, a
NULL
pointer is returned.
- Function: void stifle_history (int max)
Stifle the history list, remembering only the last max entries.
- Function: int unstifle_history (void)
Stop stifling the history. This returns the previously-set maximum number of history entries (as set by
stifle_history()
). The value is positive if the history was stifled, negative if it wasn’t.
- Function: int history_is_stifled (void)
Returns non-zero if the history is stifled, zero if it is not.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |