Ruby  1.9.3p551(2014-11-13revision48407)
Macros | Functions | Variables
escape.c File Reference
#include "transcode_data.h"

Go to the source code of this file.

Macros

#define from__to_amp_escape_offsets   0
 
#define str1_amp   makeSTR1(258)
 
#define from__to_xml_text_escape_offsets   264
 
#define str1_lt   makeSTR1(522)
 
#define str1_gt   makeSTR1(527)
 
#define from__to_xml_attr_content_escape_offsets   532
 
#define str1_quot   makeSTR1(790)
 
#define escape_xml_attr_quote_offsets   797
 
#define from__to_amp_escape_infos   WORDINDEX2INFO(0)
 
#define from__to_amp_escape   WORDINDEX2INFO(2)
 
#define from__to_xml_text_escape_infos   WORDINDEX2INFO(4)
 
#define from__to_xml_text_escape   WORDINDEX2INFO(8)
 
#define from__to_xml_attr_content_escape_infos   WORDINDEX2INFO(10)
 
#define from__to_xml_attr_content_escape   WORDINDEX2INFO(15)
 
#define escape_xml_attr_quote_infos   WORDINDEX2INFO(17)
 
#define escape_xml_attr_quote   WORDINDEX2INFO(18)
 
#define TRANSCODE_TABLE_INFO   escape_byte_array, 1055, escape_word_array, 20, ((int)sizeof(unsigned int))
 
#define END   0
 
#define NORMAL   1
 

Functions

static int escape_xml_attr_quote_init (void *statep)
 
static ssize_t fun_so_escape_xml_attr_quote (void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
 
static ssize_t escape_xml_attr_quote_finish (void *statep, unsigned char *o, size_t osize)
 
void Init_escape (void)
 

Variables

static const unsigned char escape_byte_array [1055]
 
static const unsigned int escape_word_array [20]
 
static const rb_transcoder rb_from__to_amp_escape
 
static const rb_transcoder rb_from__to_xml_text_escape
 
static const rb_transcoder rb_from__to_xml_attr_content_escape
 
static const rb_transcoder rb_escape_xml_attr_quote
 

Macro Definition Documentation

◆ END

#define END   0

◆ escape_xml_attr_quote

#define escape_xml_attr_quote   WORDINDEX2INFO(18)

◆ escape_xml_attr_quote_infos

#define escape_xml_attr_quote_infos   WORDINDEX2INFO(17)

◆ escape_xml_attr_quote_offsets

#define escape_xml_attr_quote_offsets   797

◆ from__to_amp_escape

#define from__to_amp_escape   WORDINDEX2INFO(2)

◆ from__to_amp_escape_infos

#define from__to_amp_escape_infos   WORDINDEX2INFO(0)

◆ from__to_amp_escape_offsets

#define from__to_amp_escape_offsets   0

◆ from__to_xml_attr_content_escape

#define from__to_xml_attr_content_escape   WORDINDEX2INFO(15)

◆ from__to_xml_attr_content_escape_infos

#define from__to_xml_attr_content_escape_infos   WORDINDEX2INFO(10)

◆ from__to_xml_attr_content_escape_offsets

#define from__to_xml_attr_content_escape_offsets   532

◆ from__to_xml_text_escape

#define from__to_xml_text_escape   WORDINDEX2INFO(8)

◆ from__to_xml_text_escape_infos

#define from__to_xml_text_escape_infos   WORDINDEX2INFO(4)

◆ from__to_xml_text_escape_offsets

#define from__to_xml_text_escape_offsets   264

◆ NORMAL

#define NORMAL   1

Definition at line 172 of file escape.c.

Referenced by fun_so_escape_xml_attr_quote().

◆ str1_amp

#define str1_amp   makeSTR1(258)

◆ str1_gt

#define str1_gt   makeSTR1(527)

◆ str1_lt

#define str1_lt   makeSTR1(522)

◆ str1_quot

#define str1_quot   makeSTR1(790)

◆ TRANSCODE_TABLE_INFO

#define TRANSCODE_TABLE_INFO   escape_byte_array, 1055, escape_word_array, 20, ((int)sizeof(unsigned int))

Definition at line 132 of file escape.c.

Function Documentation

◆ escape_xml_attr_quote_finish()

static ssize_t escape_xml_attr_quote_finish ( void *  statep,
unsigned char *  o,
size_t  osize 
)
static

Definition at line 196 of file escape.c.

References END.

◆ escape_xml_attr_quote_init()

static int escape_xml_attr_quote_init ( void *  statep)
static

Definition at line 175 of file escape.c.

References END.

◆ fun_so_escape_xml_attr_quote()

static ssize_t fun_so_escape_xml_attr_quote ( void *  statep,
const unsigned char *  s,
size_t  l,
unsigned char *  o,
size_t  osize 
)
static

Definition at line 183 of file escape.c.

References END, and NORMAL.

◆ Init_escape()

void Init_escape ( void  )

Variable Documentation

◆ escape_byte_array

const unsigned char escape_byte_array[1055]
static

Definition at line 10 of file escape.c.

◆ escape_word_array

const unsigned int escape_word_array[20]
static

Definition at line 101 of file escape.c.

◆ rb_escape_xml_attr_quote

const rb_transcoder rb_escape_xml_attr_quote
static
Initial value:
= {
"", "xml_attr_quote", escape_xml_attr_quote,
1,
1,
7,
}
static int escape_xml_attr_quote_init(void *statep)
Definition: escape.c:175
#define TRANSCODE_TABLE_INFO
Definition: escape.c:132
static ssize_t escape_xml_attr_quote_finish(void *statep, unsigned char *o, size_t osize)
Definition: escape.c:196
#define NULL
Definition: _sdbm.c:107
static ssize_t fun_so_escape_xml_attr_quote(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
Definition: escape.c:183
#define escape_xml_attr_quote

Definition at line 212 of file escape.c.

Referenced by Init_escape().

◆ rb_from__to_amp_escape

const rb_transcoder rb_from__to_amp_escape
static
Initial value:
= {
"", "amp_escape", from__to_amp_escape,
1,
1,
5,
0, NULL, NULL,
}
#define from__to_amp_escape
#define TRANSCODE_TABLE_INFO
Definition: escape.c:132
#define NULL
Definition: _sdbm.c:107

Definition at line 134 of file escape.c.

Referenced by Init_escape().

◆ rb_from__to_xml_attr_content_escape

const rb_transcoder rb_from__to_xml_attr_content_escape
static
Initial value:
= {
"", "xml_attr_content_escape", from__to_xml_attr_content_escape,
1,
1,
6,
0, NULL, NULL,
}
#define TRANSCODE_TABLE_INFO
Definition: escape.c:132
#define NULL
Definition: _sdbm.c:107
#define from__to_xml_attr_content_escape

Definition at line 158 of file escape.c.

Referenced by Init_escape().

◆ rb_from__to_xml_text_escape

const rb_transcoder rb_from__to_xml_text_escape
static
Initial value:
= {
"", "xml_text_escape", from__to_xml_text_escape,
1,
1,
5,
0, NULL, NULL,
}
#define from__to_xml_text_escape
#define TRANSCODE_TABLE_INFO
Definition: escape.c:132
#define NULL
Definition: _sdbm.c:107

Definition at line 146 of file escape.c.

Referenced by Init_escape().