ELinks 0.18.0
marks.c File Reference

Marks registry. More...

#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "document/view.h"
#include "intl/libintl.h"
#include "main/module.h"
#include "protocol/uri.h"
#include "util/memory.h"
#include "util/string.h"
#include "viewer/text/form.h"
#include "viewer/text/link.h"
#include "viewer/text/marks.h"
#include "viewer/text/view.h"
#include "viewer/text/vs.h"
Include dependency graph for marks.c:

Macros

#define MARKS_SIZE   26 * 2
 Number of possible mark characters: upper-case and lower-case ASCII letters.
 
#define is_valid_mark_char(c)   isasciialpha(c)
 
#define is_valid_mark_index(i)   ((i) >= 0 && (i) < MARKS_SIZE)
 

Functions

static int index_from_char (unsigned char mark)
 
void goto_mark (unsigned char mark, struct view_state *vs)
 
static void free_mark_by_index (int i)
 
void set_mark (unsigned char mark, struct view_state *mark_vs)
 
static void done_marks (struct module *xxx)
 

Variables

static struct view_statemarks [MARKS_SIZE]
 
struct module viewer_marks_module
 

Detailed Description

Marks registry.

Macro Definition Documentation

◆ is_valid_mark_char

#define is_valid_mark_char ( c)    isasciialpha(c)

◆ is_valid_mark_index

#define is_valid_mark_index ( i)    ((i) >= 0 && (i) < MARKS_SIZE)

◆ MARKS_SIZE

#define MARKS_SIZE   26 * 2

Number of possible mark characters: upper-case and lower-case ASCII letters.

The marks array is indexed by ASCII code of the mark.

Function Documentation

◆ done_marks()

static void done_marks ( struct module * xxx)
static

◆ free_mark_by_index()

static void free_mark_by_index ( int i)
static

◆ goto_mark()

void goto_mark ( unsigned char mark,
struct view_state * vs )

◆ index_from_char()

static int index_from_char ( unsigned char mark)
inlinestatic

◆ set_mark()

void set_mark ( unsigned char mark,
struct view_state * mark_vs )

Variable Documentation

◆ marks

struct view_state* marks[MARKS_SIZE]
static

◆ viewer_marks_module

struct module viewer_marks_module
Initial value:
N_("Marks"),
)
#define NULL
Definition explodename.c:35
#define N_(msg)
Definition libintl.h:25
static void done_marks(struct module *xxx)
Definition marks.c:148
#define struct_module(name, options, hooks, submods, data, init, done, getname)
Definition module.h:47