xine-lib 1.2.13-20230125hg15249
Macros | Enumerations | Functions | Variables
xmllexer.c File Reference
#include <xine/xineutils.h>
#include <xine/xmllexer.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include "bswap.h"
#include "xine_private.h"

Macros

#define LOG_MODULE   "xmllexer"
 
#define LOG_VERBOSE
 

Enumerations

enum  utf { UTF32BE , UTF32LE , UTF16BE , UTF16LE }
 
enum  { NORMAL , DATA , CDATA }
 
enum  lexer_state_t {
  STATE_UNKNOWN = -1 , STATE_IDLE , STATE_EOL , STATE_SEPAR ,
  STATE_T_M_START , STATE_T_M_STOP_1 , STATE_T_M_STOP_2 , STATE_T_EQUAL ,
  STATE_T_STRING_SINGLE , STATE_T_STRING_DOUBLE , STATE_T_COMMENT , STATE_T_TI_STOP ,
  STATE_T_DASHDASH , STATE_T_C_STOP , STATE_IDENT
}
 

Functions

static void lex_convert (struct lexer *lexer, const char *buf, int size, enum utf utf)
 
void lexer_init (const char *buf, int size)
 
struct lexerlexer_init_r (const char *buf, int size)
 
void lexer_finalize_r (struct lexer *lexer)
 
int lexer_get_token_d (char **_tok, int *_tok_size, int fixed)
 
int lexer_get_token_d_r (struct lexer *lexer, char **_tok, int *_tok_size, int fixed)
 
int lexer_get_token (char *tok, int tok_size)
 
char * lexer_decode_entities (const char *tok)
 

Variables

struct lexerstatic_lexer
 
struct { 
 
   char   code 
 
   unsigned char   namelen 
 
   char   name [6] 
 
lexer_entities [] 
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "xmllexer"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NORMAL 
DATA 
CDATA 

◆ lexer_state_t

Enumerator
STATE_UNKNOWN 
STATE_IDLE 
STATE_EOL 
STATE_SEPAR 
STATE_T_M_START 
STATE_T_M_STOP_1 
STATE_T_M_STOP_2 
STATE_T_EQUAL 
STATE_T_STRING_SINGLE 
STATE_T_STRING_DOUBLE 
STATE_T_COMMENT 
STATE_T_TI_STOP 
STATE_T_DASHDASH 
STATE_T_C_STOP 
STATE_IDENT 

◆ utf

enum utf
Enumerator
UTF32BE 
UTF32LE 
UTF16BE 
UTF16LE 

Function Documentation

◆ lex_convert()

static void lex_convert ( struct lexer * lexer,
const char * buf,
int size,
enum utf utf )
static

◆ lexer_decode_entities()

char * lexer_decode_entities ( const char * tok)

References code, lexer_entities, name, namelen, and NULL.

Referenced by xml_parser_get_node_internal().

◆ lexer_finalize_r()

void lexer_finalize_r ( struct lexer * lexer)

References _x_freep(), and lexer::lex_malloc.

Referenced by lexer_init(), and xml_parser_finalize_r().

◆ lexer_get_token()

int lexer_get_token ( char * tok,
int tok_size )

◆ lexer_get_token_d()

int lexer_get_token_d ( char ** _tok,
int * _tok_size,
int fixed )

◆ lexer_get_token_d_r()

int lexer_get_token_d_r ( struct lexer * lexer,
char ** _tok,
int * _tok_size,
int fixed )

◆ lexer_init()

void lexer_init ( const char * buf,
int size )

◆ lexer_init_r()

struct lexer * lexer_init_r ( const char * buf,
int size )

Variable Documentation

◆ code

char code

◆ [struct]

struct { ... } lexer_entities[]
Initial value:
= {
{ '"', 4, "quot" },
{ '&', 3, "amp" },
{ '\'', 4, "apos" },
{ '<', 2, "lt" },
{ '>', 2, "gt" },
{ '\0', 0, "" }
}

Referenced by lexer_decode_entities().

◆ name

char name[6]

Referenced by lexer_decode_entities().

◆ namelen

unsigned char namelen

Referenced by lexer_decode_entities().

◆ static_lexer

struct lexer* static_lexer