ELinks 0.16.1.1
util.c File Reference
#include <sys/types.h>
#include <string.h>
#include "elinks.h"
#include "bookmarks/bookmarks.h"
#include "document/css/property.h"
#include "document/docdata.h"
#include "document/document.h"
#include "document/dom/util.h"
#include "document/format.h"
#include "intl/charsets.h"
#include "globhist/globhist.h"
#include "protocol/uri.h"
#include "terminal/draw.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/box.h"
Include dependency graph for util.c:

Macros

#define POS(renderer)
#define WIDTH(renderer, add)
#define realloc_document_links(doc, size)

Functions

static void init_template (struct screen_char *template_, struct document_options *options, screen_char_attr_T attr, color_T foreground, color_T background)
void init_template_by_style (struct screen_char *template_, struct document_options *options, struct css_property list *properties)
static struct screen_charrealloc_line (struct document *document, int x, int y)
static struct nodeadd_search_node (struct dom_renderer *renderer, int width)
static void render_dom_line (struct dom_renderer *renderer, struct screen_char *template_, char *string, int length)
static char * split_dom_line (char *line, int length, int *linelen)
void render_dom_text (struct dom_renderer *renderer, struct screen_char *template_, char *string, int length)
NONSTATIC_INLINE struct linkadd_dom_link (struct dom_renderer *renderer, const char *cstring, int length, char *uristring, int urilength)

Macro Definition Documentation

◆ POS

#define POS ( renderer)
Value:
(&(renderer)->document->data[Y(renderer)].chars[X(renderer)])
#define X(renderer)
Definition util.h:44
#define Y(renderer)
Definition util.h:45

◆ realloc_document_links

#define realloc_document_links ( doc,
size )
Value:
ALIGN_LINK(&(doc)->links, (doc)->nlinks, size)
int size
Definition charsets.c:207
#define ALIGN_LINK(x, o, n)
Definition docdata.h:17

◆ WIDTH

#define WIDTH ( renderer,
add )
Value:
((renderer)->canvas_x + (add))

Function Documentation

◆ add_dom_link()

NONSTATIC_INLINE struct link * add_dom_link ( struct dom_renderer * renderer,
const char * cstring,
int length,
char * uristring,
int urilength )

◆ add_search_node()

struct node * add_search_node ( struct dom_renderer * renderer,
int width )
static

◆ init_template()

void init_template ( struct screen_char * template_,
struct document_options * options,
screen_char_attr_T attr,
color_T foreground,
color_T background )
inlinestatic

◆ init_template_by_style()

void init_template_by_style ( struct screen_char * template_,
struct document_options * options,
struct css_property list * properties )

◆ realloc_line()

struct screen_char * realloc_line ( struct document * document,
int x,
int y )
static

◆ render_dom_line()

void render_dom_line ( struct dom_renderer * renderer,
struct screen_char * template_,
char * string,
int length )
static

◆ render_dom_text()

void render_dom_text ( struct dom_renderer * renderer,
struct screen_char * template_,
char * string,
int length )

◆ split_dom_line()

char * split_dom_line ( char * line,
int length,
int * linelen )
inlinestatic