Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

html.c File Reference


Detailed Description

Simple HTML handling.

Author:
Christian Biere
Date:
2007

#include "common.h"
#include "lib/html.h"
#include "lib/html_entities.h"
#include "lib/misc.h"
#include "lib/utf8.h"
#include "lib/walloc.h"
#include "lib/override.h"

Data Structures

struct  html_node
struct  html_output
struct  render_context

Defines

#define D(x)   { #x, HTML_ATTR_ ## x, }
#define D(x)   { #x, HTML_TAG_ ## x, }

Enumerations

enum  html_node_type { HTML_NODE_ROOT, HTML_NODE_TAG, HTML_NODE_TEXT }

Functions

html_nodehtml_node_alloc (void)
void html_node_free (struct html_node **node_ptr)
void html_output_print (struct html_output *output, const struct array text)
void html_output_tag (struct html_output *output, const struct array tag)
html_outputhtml_output_alloc (void)
void html_output_free (struct html_output **output_ptr)
void html_output_set_udata (struct html_output *output, void *udata)
void html_output_set_print (struct html_output *output, void(*print)(struct html_output *, const struct array *))
void html_output_set_tag (struct html_output *output, void(*tag)(struct html_output *, const struct array *))
void * html_output_get_udata (struct html_output *output)
enum html_attr parse_attribute (const struct array attr)
enum html_tag parse_tag (const struct array tag)
gboolean html_tag_is_closing (const struct array *tag)
enum html_tag html_parse_tag (const struct array *tag)
array html_get_attribute (const struct array *tag, enum html_attr attribute)
void render_tag (struct render_context *ctx, const struct array tag)
guint32 parse_named_entity (const struct array entity)
guint32 parse_numeric_entity (const struct array entity)
guint32 parse_entity (const struct array entity)
void render_entity (struct render_context *ctx, const struct array entity)
void render_text (struct render_context *ctx, const struct array text)
void render (struct render_context *ctx)
int parse (struct html_output *output, const struct array array)
int html_load_memory (struct html_output *output, const struct array data)
int html_load_file (struct html_output *output, int fd)

Variables

const struct html_node zero_html_node
const struct render_context zero_render_context


Define Documentation

#define D  )     { #x, HTML_TAG_ ## x, }
 

#define D  )     { #x, HTML_ATTR_ ## x, }
 


Enumeration Type Documentation

enum html_node_type
 

Enumeration values:
HTML_NODE_ROOT 
HTML_NODE_TAG 
HTML_NODE_TEXT 


Function Documentation

struct array html_get_attribute const struct array tag,
enum html_attr  attribute
 

<tag-name>([<space>][<attr>[<space>]'='[<space>]'"'<value>'"'])*

int html_load_file struct html_output output,
int  fd
 

int html_load_memory struct html_output output,
const struct array  data
 

struct html_node* html_node_alloc void   )  [static]
 

void html_node_free struct html_node **  node_ptr  )  [static]
 

struct html_output* html_output_alloc void   ) 
 

void html_output_free struct html_output **  output_ptr  ) 
 

void* html_output_get_udata struct html_output output  ) 
 

void html_output_print struct html_output output,
const struct array  text
[static]
 

void html_output_set_print struct html_output output,
void(*)(struct html_output *, const struct array *)  print
 

void html_output_set_tag struct html_output output,
void(*)(struct html_output *, const struct array *)  tag
 

void html_output_set_udata struct html_output output,
void *  udata
 

void html_output_tag struct html_output output,
const struct array  tag
[static]
 

enum html_tag html_parse_tag const struct array tag  ) 
 

gboolean html_tag_is_closing const struct array tag  ) 
 

int parse struct html_output output,
const struct array  array
[static]
 

enum html_attr parse_attribute const struct array  attr  )  [static]
 

guint32 parse_entity const struct array  entity  )  [static]
 

guint32 parse_named_entity const struct array  entity  )  [static]
 

guint32 parse_numeric_entity const struct array  entity  )  [static]
 

enum html_tag parse_tag const struct array  tag  )  [static]
 

void render struct render_context ctx  )  [static]
 

void render_entity struct render_context ctx,
const struct array  entity
[static]
 

void render_tag struct render_context ctx,
const struct array  tag
[static]
 

void render_text struct render_context ctx,
const struct array  text
[static]
 


Variable Documentation

const struct html_node zero_html_node [static]
 

const struct render_context zero_render_context [static]
 


Generated on Sat Jun 30 17:53:27 2007 for gtk-gnutella by  doxygen 1.3.9.1