ELinks 0.18.0
Macros | Functions
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)   (&(renderer)->document->data[Y(renderer)].ch.chars[X(renderer)])
 
#define WIDTH(renderer, add)   ((renderer)->canvas_x + (add))
 
#define realloc_document_links(doc, size)    ALIGN_LINK(&(doc)->links, (doc)->nlinks, 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_char * realloc_line (struct document *document, int x, int y)
 
static struct node * add_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 link * add_dom_link (struct dom_renderer *renderer, const char *cstring, int length, char *uristring, int urilength)
 

Macro Definition Documentation

◆ POS

#define POS (   renderer)    (&(renderer)->document->data[Y(renderer)].ch.chars[X(renderer)])

◆ realloc_document_links

#define realloc_document_links (   doc,
  size 
)     ALIGN_LINK(&(doc)->links, (doc)->nlinks, size)

◆ WIDTH

#define WIDTH (   renderer,
  add 
)    ((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()

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

◆ init_template()

static 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()

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

◆ render_dom_line()

static 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()

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