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

history.h File Reference

Prototypes for history functions, part of the user interface. More...

#include <wchar.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void history_init ()
 Init history library.
void history_destroy ()
 Saves the new history to disc and frees all memory used by the history.
void history_add (const wchar_t *str)
 Add a new history item to the bottom of the history, containing a copy of str.
const wchar_t * history_prev_match (const wchar_t *str)
 Find previous history item starting with str.
wchar_t * history_get (int idx)
 Return the specified history at the specified index, or 0 if out of bounds.
void history_first ()
 Move to first history item.
void history_reset ()
 Make current point to last history item.
const wchar_t * history_next_match (const wchar_t *str)
 Find next history item starting with str.
void history_set_mode (const wchar_t *name)
 Set the current mode name for history.
void history_sanity_check ()
 Perform sanity checks.


Detailed Description

Prototypes for history functions, part of the user interface.


Function Documentation

void history_add const wchar_t *  str  ) 
 

Add a new history item to the bottom of the history, containing a copy of str.

Remove any duplicates. Moves the current item past the end of the history list.

wchar_t* history_get int  idx  ) 
 

Return the specified history at the specified index, or 0 if out of bounds.

0 is the index of the current commandline.

void history_init  ) 
 

Init history library.

The history file won't actually be loaded until the first time a history search is performed.

const wchar_t* history_next_match const wchar_t *  str  ) 
 

Find next history item starting with str.

If this moves past the end of the history, str is returned.

const wchar_t* history_prev_match const wchar_t *  str  ) 
 

Find previous history item starting with str.

If this moves before the start of the history, str is returned.

void history_set_mode const wchar_t *  name  ) 
 

Set the current mode name for history.

Each application that uses the history has it's own mode. This must be called prior to any use of the history.


Generated on Sun Jan 13 02:52:54 2008 for fish by  doxygen 1.4.4