ELinks 0.18.0
sgml-parser.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dom/configuration.h"
#include "dom/node.h"
#include "dom/sgml/dump.h"
#include "dom/sgml/parser.h"
#include "dom/stack.h"
#include "util/test.h"
Include dependency graph for sgml-parser.c:

Macros

#define get_indent_offset(stack)

Functions

int get_ctl_handle ()
static int update_number_of_lines (struct dom_stack *stack)
static void print_compressed_string (struct dom_string *string)
static void print_dom_node_value (struct dom_node *node)
static void print_indent (struct dom_stack *stack)
static enum dom_code sgml_parser_test_tree (struct dom_stack *stack, struct dom_node *node, void *data)
static enum dom_code sgml_parser_test_id_leaf (struct dom_stack *stack, struct dom_node *node, void *data)
static enum dom_code sgml_parser_test_leaf (struct dom_stack *stack, struct dom_node *node, void *data)
static enum dom_code sgml_parser_test_branch (struct dom_stack *stack, struct dom_node *node, void *data)
static enum dom_code sgml_parser_test_end (struct dom_stack *stack, struct dom_node *node, void *data)
static enum dom_code sgml_error_function (struct sgml_parser *parser, struct dom_string *string, unsigned int line_number)
int main (int argc, char *argv[])

Variables

unsigned int number_of_lines = 0
static unsigned char indent_string []
struct dom_stack_context_info sgml_parser_test_context_info

Macro Definition Documentation

◆ get_indent_offset

#define get_indent_offset ( stack)
Value:
(((stack)->depth < sizeof(indent_string)/2 ? (stack)->depth * 2 : sizeof(indent_string)) - 2)
static unsigned char indent_string[]
Definition sgml-parser.c:97

Function Documentation

◆ get_ctl_handle()

int get_ctl_handle ( void )

◆ main()

int main ( int argc,
char * argv[] )

◆ print_compressed_string()

void print_compressed_string ( struct dom_string * string)
static

◆ print_dom_node_value()

void print_dom_node_value ( struct dom_node * node)
static

◆ print_indent()

void print_indent ( struct dom_stack * stack)
static

◆ sgml_error_function()

enum dom_code sgml_error_function ( struct sgml_parser * parser,
struct dom_string * string,
unsigned int line_number )
static

◆ sgml_parser_test_branch()

enum dom_code sgml_parser_test_branch ( struct dom_stack * stack,
struct dom_node * node,
void * data )
static

◆ sgml_parser_test_end()

enum dom_code sgml_parser_test_end ( struct dom_stack * stack,
struct dom_node * node,
void * data )
static

◆ sgml_parser_test_id_leaf()

enum dom_code sgml_parser_test_id_leaf ( struct dom_stack * stack,
struct dom_node * node,
void * data )
static

◆ sgml_parser_test_leaf()

enum dom_code sgml_parser_test_leaf ( struct dom_stack * stack,
struct dom_node * node,
void * data )
static

◆ sgml_parser_test_tree()

enum dom_code sgml_parser_test_tree ( struct dom_stack * stack,
struct dom_node * node,
void * data )
static

◆ update_number_of_lines()

int update_number_of_lines ( struct dom_stack * stack)
static

Variable Documentation

◆ indent_string

unsigned char indent_string[]
static
Initial value:
=
" "

◆ number_of_lines

unsigned int number_of_lines = 0

◆ sgml_parser_test_context_info

struct dom_stack_context_info sgml_parser_test_context_info