(history.info.gz) History Storage
Info Catalog
(history.info.gz) Introduction to History
(history.info.gz) Programming with GNU History
(history.info.gz) History Functions
2.2 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;
char *timestamp;
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.
Info Catalog
(history.info.gz) Introduction to History
(history.info.gz) Programming with GNU History
(history.info.gz) History Functions
automatically generated byinfo2html