ELinks 0.18.0
renderer.c File Reference
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "bookmarks/bookmarks.h"
#include "cache/cache.h"
#include "config/options.h"
#include "document/docdata.h"
#include "document/document.h"
#include "document/format.h"
#include "document/options.h"
#include "document/plain/renderer.h"
#include "document/renderer.h"
#include "globhist/globhist.h"
#include "intl/charsets.h"
#include "protocol/protocol.h"
#include "protocol/uri.h"
#include "terminal/color.h"
#include "terminal/draw.h"
#include "util/color.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
Include dependency graph for renderer.c:

Data Structures

struct  plain_renderer

Macros

#define realloc_document_links(doc, size)
#define url_char(c)
#define RED_COLOR_MASK   0x00FF0000
#define GREEN_COLOR_MASK   0x0000FF00
#define BLUE_COLOR_MASK   0x000000FF
#define RED_COLOR(color)
#define GREEN_COLOR(color)
#define BLUE_COLOR(color)

Functions

static struct screen_charrealloc_line (struct document *document, int x, int y)
static struct linkadd_document_link (struct document *document, char *uri, int length, int x, int y)
static struct linkcheck_link_word (struct document *document, char *uri, int length, int x, int y)
static int get_uri_length (char *line, int length)
static int print_document_link (struct plain_renderer *renderer, int lineno, char *line, int line_pos, int width, int expanded, struct screen_char *pos, int cells)
static void decode_esc_color (char *text, int *line_pos, int width, struct screen_char *template_, color_mode_T mode, int *was_reversed)
static int add_document_line (struct plain_renderer *renderer, char *line, int line_width)
static void init_template (struct screen_char *template_, struct document_options *options)
static struct nodeadd_node (struct plain_renderer *renderer, int x, int width, int height)
static void add_document_lines (struct plain_renderer *renderer)
static void fixup_tables (struct plain_renderer *renderer)
void render_plain_document (struct cache_entry *cached, struct document *document, struct string *buffer)

Macro Definition Documentation

◆ BLUE_COLOR

#define BLUE_COLOR ( color)
Value:
(((color) & BLUE_COLOR_MASK) >> 0)
#define BLUE_COLOR_MASK
Definition renderer.c:241

◆ BLUE_COLOR_MASK

#define BLUE_COLOR_MASK   0x000000FF

◆ GREEN_COLOR

#define GREEN_COLOR ( color)
Value:
(((color) & GREEN_COLOR_MASK) >> 8)
#define GREEN_COLOR_MASK
Definition renderer.c:240

◆ GREEN_COLOR_MASK

#define GREEN_COLOR_MASK   0x0000FF00

◆ realloc_document_links

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

◆ RED_COLOR

#define RED_COLOR ( color)
Value:
(((color) & RED_COLOR_MASK) >> 16)
#define RED_COLOR_MASK
Definition renderer.c:239

◆ RED_COLOR_MASK

#define RED_COLOR_MASK   0x00FF0000

◆ url_char

#define url_char ( c)
Value:
( \
(c) > ' ' \
&& (c) != '<' \
&& (c) != '>' \
&& (c) != '(' \
&& (c) != ')' \
&& !isquote(c))
#define isquote(c)
Definition string.h:79

Function Documentation

◆ add_document_line()

int add_document_line ( struct plain_renderer * renderer,
char * line,
int line_width )
inlinestatic

◆ add_document_lines()

void add_document_lines ( struct plain_renderer * renderer)
static

◆ add_document_link()

struct link * add_document_link ( struct document * document,
char * uri,
int length,
int x,
int y )
inlinestatic

◆ add_node()

struct node * add_node ( struct plain_renderer * renderer,
int x,
int width,
int height )
static

◆ check_link_word()

struct link * check_link_word ( struct document * document,
char * uri,
int length,
int x,
int y )
inlinestatic

◆ decode_esc_color()

void decode_esc_color ( char * text,
int * line_pos,
int width,
struct screen_char * template_,
color_mode_T mode,
int * was_reversed )
static

◆ fixup_tables()

void fixup_tables ( struct plain_renderer * renderer)
static

◆ get_uri_length()

int get_uri_length ( char * line,
int length )
inlinestatic

◆ init_template()

void init_template ( struct screen_char * template_,
struct document_options * options )
static

◆ print_document_link()

int print_document_link ( struct plain_renderer * renderer,
int lineno,
char * line,
int line_pos,
int width,
int expanded,
struct screen_char * pos,
int cells )
static

◆ realloc_line()

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

◆ render_plain_document()

void render_plain_document ( struct cache_entry * cached,
struct document * document,
struct string * buffer )