GNU Info

Info Node: (history.info)History Storage

(history.info)History Storage


Next: History Functions Prev: Introduction to History Up: Programming with GNU History
Enter node , (file) or (file)node

History Storage
===============

   The history list is an array of history entries.  A history entry is
declared as follows:

     typedef void *histdata_t;
     
     typedef struct _hist_entry {
       char *line;
       histdata_t data;
     } HIST_ENTRY;

   The history list itself might therefore be declared as

     HIST_ENTRY **the_history_list;

   The state of the History library is encapsulated into a single
structure:

     /*
      * A structure used to pass around the current state of the history.
      */
     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. */
       int flags;
     } HISTORY_STATE;

   If the flags member includes `HS_STIFLED', the history has been
stifled.


automatically generated by info2www version 1.2.2.9