history: Information About the History List

1 
1 2.3.3 Information About the History List
1 ----------------------------------------
1 
1 These functions return information about the entire history list or
1 individual list entries.
1 
1  -- Function: HIST_ENTRY ** history_list (void)
1      Return a 'NULL' terminated array of 'HIST_ENTRY *' which is the
1      current input history.  Element 0 of this list is the beginning of
1      time.  If there is no history, return 'NULL'.
1 
1  -- Function: int where_history (void)
1      Returns the offset of the current history element.
1 
1  -- Function: HIST_ENTRY * current_history (void)
1      Return the history entry at the current position, as determined by
1      'where_history()'.  If there is no entry there, return a 'NULL'
1      pointer.
1 
1  -- Function: HIST_ENTRY * history_get (int offset)
1      Return the history entry at position OFFSET, starting from
1      'history_base' (⇒History Variables).  If there is no entry
1      there, or if OFFSET is greater than the history length, return a
1      'NULL' pointer.
1 
1  -- Function: time_t history_get_time (HIST_ENTRY *entry)
1      Return the time stamp associated with the history entry ENTRY.  If
1      the timestamp is missing or invalid, return 0.
1 
1  -- Function: int history_total_bytes (void)
1      Return the number of bytes that the primary history entries are
1      using.  This function returns the sum of the lengths of all the
1      lines in the history.
1