ELinks 0.16.1.1
history.c File Reference

Visited URL history managment - NOT dialog_goto_url() history! More...

#include <string.h>
#include "elinks.h"
#include "cache/cache.h"
#include "config/options.h"
#include "dialogs/status.h"
#include "network/connection.h"
#include "protocol/uri.h"
#include "session/history.h"
#include "session/location.h"
#include "session/session.h"
#include "session/task.h"
#include "util/memory.h"
#include "util/string.h"
#include "viewer/text/view.h"
#include "viewer/text/vs.h"
Include dependency graph for history.c:

Functions

static void free_history (struct location list *history)
void ses_history_move (struct session *ses)
void go_history (struct session *ses, struct location *loc)
 Note that this function is dangerous, and its results are sort of unpredictable.
int go_history_by_n (struct session *ses, int n)
 Move back -n times if n is negative, forward n times if positive.
void go_back (struct session *ses)
 Go backward in the history.
void go_unback (struct session *ses)
 Go forward in the history.

Detailed Description

Visited URL history managment - NOT dialog_goto_url() history!

Function Documentation

◆ free_history()

void free_history ( struct location list * history)
inlinestatic

◆ go_back()

void go_back ( struct session * ses)

Go backward in the history.

See go_history() description regarding unpredictable effects on cur_loc() by this function.

◆ go_history()

void go_history ( struct session * ses,
struct location * loc )

Note that this function is dangerous, and its results are sort of unpredictable.

If the document is cached and is permitted to be fetched from the cache, the effect of this function is immediate and you end up with the new location being cur_loc(). BUT if the cache entry cannot be used, the effect is delayed to the next main loop iteration, as the TASK_HISTORY session task (ses_history_move()) is executed not now but in the bottom-half handler. So, you MUST NOT depend on cur_loc() having an arbitrary value after call to this function (or the regents go_(un)back(), of course).

◆ go_history_by_n()

int go_history_by_n ( struct session * ses,
int n )

Move back -n times if n is negative, forward n times if positive.

◆ go_unback()

void go_unback ( struct session * ses)

Go forward in the history.

See go_history() description regarding unpredictable effects on cur_loc() by this function.

◆ ses_history_move()

void ses_history_move ( struct session * ses)