history: History List Management

1 
1 2.3.2 History List Management
1 -----------------------------
1 
1 These functions manage individual entries on the history list, or set
1 parameters managing the list itself.
1 
1  -- Function: void add_history (const char *string)
1      Place STRING at the end of the history list.  The associated data
1      field (if any) is set to 'NULL'.
1 
1  -- Function: void add_history_time (const char *string)
1      Change the time stamp associated with the most recent history entry
1      to STRING.
1 
1  -- Function: HIST_ENTRY * remove_history (int which)
1      Remove history entry at offset WHICH from the history.  The removed
1      element is returned so you can free the line, data, and containing
1      structure.
1 
1  -- Function: histdata_t free_history_entry (HIST_ENTRY *histent)
1      Free the history entry HISTENT and any history library private data
1      associated with it.  Returns the application-specific data so the
1      caller can dispose of it.
1 
1  -- Function: HIST_ENTRY * replace_history_entry (int which, const char
1           *line, histdata_t data)
1      Make the history entry at offset WHICH have LINE and DATA.  This
1      returns the old entry so the caller can dispose of any
1      application-specific data.  In the case of an invalid WHICH, a
1      'NULL' pointer is returned.
1 
1  -- Function: void clear_history (void)
1      Clear the history list by deleting all the entries.
1 
1  -- Function: void stifle_history (int max)
1      Stifle the history list, remembering only the last MAX entries.
1 
1  -- Function: int unstifle_history (void)
1      Stop stifling the history.  This returns the previously-set maximum
1      number of history entries (as set by 'stifle_history()').  The
1      value is positive if the history was stifled, negative if it
1      wasn't.
1 
1  -- Function: int history_is_stifled (void)
1      Returns non-zero if the history is stifled, zero if it is not.
1