Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

history_mode_t Struct Reference

A struct representiong a history list. More...

Collaboration diagram for history_mode_t:

Collaboration graph
[legend]

Data Fields

const wchar_t * name
 The name of this list.
array_list_t item
 The items of the list.
hash_table_t session_item
 A hash table containing all the items created by the current session as keys.
int pos
 The current history position.
int has_loaded
 This flag is set nonzero if the file containing earlier saves has ben mmaped in.
char * mmap_start
 The mmaped region for the history file.
size_t mmap_length
 The size of the mmaped region.
array_list_t used
 A list of indices of all previous search maches.
time_t save_timestamp
 Timestamp of last save.
int new_count
 Number of entries that have been added since last save.
void * item_context
 A halloc context.

Detailed Description

A struct representiong a history list.


Field Documentation

array_list_t history_mode_t::item
 

The items of the list.

Each entry may be either a pointer to an item_t struct or a pointer to an mmaped memory region where a multibyte string representing the item is stored. Use the item_get function to always get an item_t.

void* history_mode_t::item_context
 

A halloc context.

This context is free'd every time the history is saved. Therefore it is very well suited for use as the context for history item data.

const wchar_t* history_mode_t::name
 

The name of this list.

Used for picking a suitable filename and for switching modes.

hash_table_t history_mode_t::session_item
 

A hash table containing all the items created by the current session as keys.

This can be used as a lookup when loading the history list to ignore the on-file version of an entry from this session.

array_list_t history_mode_t::used
 

A list of indices of all previous search maches.

This is used to eliminate duplicate search results.


The documentation for this struct was generated from the following file:
Generated on Sun Jan 13 02:53:40 2008 for fish by  doxygen 1.4.4