Dillo v3.1.1-99-gf3103cc4
Loading...
Searching...
No Matches
history.c File Reference

Linear history (it also provides indexes for the navigation stack) More...

#include "msg.h"
#include "list.h"
#include "history.h"
Include dependency graph for history.c:

Go to the source code of this file.

Functions

void History_show (void)
 Debug procedure.
 
int a_History_add_url (DilloUrl *url)
 Add a new H_Item at the end of the history list (taking care of not making a duplicate entry)
 
const DilloUrla_History_get_url (int idx)
 Return the DilloUrl field (by index)
 
const char * a_History_get_title (int idx, int force)
 Return the title field (by index) ('force' returns URL_STR when there's no title)
 
const char * a_History_get_title_by_url (const DilloUrl *url, int force)
 Return the title field (by url) ('force' returns URL_STR when there's no title)
 
void a_History_set_title_by_url (const DilloUrl *url, const char *title)
 Set the page-title for a given URL.
 
void a_History_freeall (void)
 Free all the memory used by this module.
 

Variables

static H_Item * history = NULL
 
static int history_size = 0
 
static int history_size_max = 16
 

Detailed Description

Linear history (it also provides indexes for the navigation stack)

Definition in file history.c.

Function Documentation

◆ a_History_add_url()

int a_History_add_url ( DilloUrl url)

Add a new H_Item at the end of the history list (taking care of not making a duplicate entry)

Definition at line 50 of file history.c.

References _MSG, a_List_add, a_Url_cmp(), a_Url_dup(), history, history_size, history_size_max, URL_FRAGMENT, and URL_STR.

Referenced by a_Nav_expect_done().

◆ a_History_freeall()

void a_History_freeall ( void  )

Free all the memory used by this module.

Definition at line 152 of file history.c.

References a_Url_free(), dFree(), history, and history_size.

Referenced by main().

◆ a_History_get_title()

const char * a_History_get_title ( int  idx,
int  force 
)

Return the title field (by index) ('force' returns URL_STR when there's no title)

Definition at line 94 of file history.c.

References dReturn_val_if_fail, history, history_size, and URL_STR.

Referenced by a_Menu_history_popup().

◆ a_History_get_title_by_url()

const char * a_History_get_title_by_url ( const DilloUrl url,
int  force 
)

Return the title field (by url) ('force' returns URL_STR when there's no title)

Definition at line 110 of file history.c.

References a_Url_cmp(), dReturn_val_if_fail, history, history_size, and URL_STR_.

Referenced by a_Bookmarks_add().

◆ a_History_get_url()

◆ a_History_set_title_by_url()

void a_History_set_title_by_url ( const DilloUrl url,
const char *  title 
)

Set the page-title for a given URL.

Definition at line 130 of file history.c.

References a_Url_cmp(), dFree(), dReturn_if, dStrdup(), history, history_size, MSG_ERR, and URL_STR.

Referenced by Html_tag_close_title().

◆ History_show()

void History_show ( void  )

Debug procedure.

Definition at line 36 of file history.c.

References history, history_size, MSG, and URL_STR.

Variable Documentation

◆ history

◆ history_size

◆ history_size_max

int history_size_max = 16
static

Definition at line 30 of file history.c.

Referenced by a_History_add_url().