ELinks 0.18.0
Macros | Functions
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)    mem_align_alloc(bad_html, size, (size) + 1, 0xFF)
 
#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 table * new_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_cell * new_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)
 
static char * skip_script (char *html, char *eof)
 
struct table * parse_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 
)     mem_align_alloc(bad_html, size, (size) + 1, 0xFF)

◆ SMART_RAISE_LIMIT

#define SMART_RAISE_LIMIT   256*1024

Function Documentation

◆ add_table_bad_html_end()

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

◆ add_table_bad_html_start()

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

◆ copy_table()

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

◆ expand_cells()

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

◆ free_table()

void free_table ( struct table *  table)

◆ get_align()

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

◆ get_bordercolor()

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

◆ get_column_width()

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

◆ get_valign()

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

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

◆ set_table_frame()

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

◆ set_table_rules()

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

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

◆ skip_table()

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

◆ smart_raise()

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