ELinks 0.16.1.1
table.c File Reference
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "document/html/parser/parse.h"
#include "document/html/parser/table.h"
#include "document/html/parser.h"
#include "document/options.h"
#include "util/color.h"
#include "util/conv.h"
#include "util/error.h"
#include "util/memory.h"
#include "document/html/internal.h"
Include dependency graph for table.c:

Macros

#define INIT_REAL_COLS   2
#define INIT_REAL_ROWS   2
#define realloc_bad_html(bad_html, size)
#define SMART_RAISE_LIMIT   256*1024

Functions

static void add_table_bad_html_start (struct table *table, char *start)
static void add_table_bad_html_end (struct table *table, char *end)
static void get_bordercolor (struct html_context *html_context, char *a, color_T *rgb)
static void get_align (struct html_context *html_context, char *attr, int *a)
static void get_valign (struct html_context *html_context, char *attr, int *a)
static void get_column_width (char *attr, int *width, int sh, struct html_context *html_context)
static void set_table_frame (struct html_context *html_context, struct table *table, char *attr)
static void set_table_rules (struct html_context *html_context, struct table *table, char *attr)
static void parse_table_attributes (struct table *table, char *attr, int real, struct html_context *html_context)
struct tablenew_table (void)
void free_table (struct table *table)
static void expand_cells (struct table *table, int dest_col, int dest_row)
static void copy_table (struct table *table_src, struct table *table_dst)
static int smart_raise (int target, int base, int unit, int limit)
struct table_cellnew_cell (struct table *table, int dest_col, int dest_row)
void new_columns (struct table *table, int span, int width, int align, int valign, int group)
void set_td_width (struct table *table, int col, int width, int force)
static char * skip_table (char *html, char *eof)
struct tableparse_table (char *html, char *eof, char **end, char *attr, int sh, struct html_context *html_context)

Macro Definition Documentation

◆ INIT_REAL_COLS

#define INIT_REAL_COLS   2

◆ INIT_REAL_ROWS

#define INIT_REAL_ROWS   2

◆ realloc_bad_html

#define realloc_bad_html ( bad_html,
size )
Value:
mem_align_alloc(bad_html, size, (size) + 1, 0xFF)
int size
Definition charsets.c:207
#define mem_align_alloc(ptr, old, new_, mask)
Definition memory.h:148

◆ SMART_RAISE_LIMIT

#define SMART_RAISE_LIMIT   256*1024

Function Documentation

◆ add_table_bad_html_end()

void add_table_bad_html_end ( struct table * table,
char * end )
static

◆ add_table_bad_html_start()

void add_table_bad_html_start ( struct table * table,
char * start )
static

◆ copy_table()

void copy_table ( struct table * table_src,
struct table * table_dst )
static

◆ expand_cells()

void expand_cells ( struct table * table,
int dest_col,
int dest_row )
static

◆ free_table()

void free_table ( struct table * table)

◆ get_align()

void get_align ( struct html_context * html_context,
char * attr,
int * a )
static

◆ get_bordercolor()

void get_bordercolor ( struct html_context * html_context,
char * a,
color_T * rgb )
static

◆ get_column_width()

void get_column_width ( char * attr,
int * width,
int sh,
struct html_context * html_context )
static

◆ get_valign()

void get_valign ( struct html_context * html_context,
char * attr,
int * a )
static

◆ new_cell()

struct table_cell * new_cell ( struct table * table,
int dest_col,
int dest_row )

◆ new_columns()

void new_columns ( struct table * table,
int span,
int width,
int align,
int valign,
int group )

◆ new_table()

struct table * new_table ( void )

◆ parse_table()

struct table * parse_table ( char * html,
char * eof,
char ** end,
char * attr,
int sh,
struct html_context * html_context )

◆ parse_table_attributes()

void parse_table_attributes ( struct table * table,
char * attr,
int real,
struct html_context * html_context )
static

◆ set_table_frame()

void set_table_frame ( struct html_context * html_context,
struct table * table,
char * attr )
static

◆ set_table_rules()

void set_table_rules ( struct html_context * html_context,
struct table * table,
char * attr )
static

◆ set_td_width()

void set_td_width ( struct table * table,
int col,
int width,
int force )

◆ skip_table()

char * skip_table ( char * html,
char * eof )
static

◆ smart_raise()

int smart_raise ( int target,
int base,
int unit,
int limit )
inlinestatic