ext/psych/yaml/reader.c File Reference

#include "yaml_private.h"

Go to the source code of this file.

Defines

#define BOM_UTF8   "\xef\xbb\xbf"
#define BOM_UTF16LE   "\xff\xfe"
#define BOM_UTF16BE   "\xfe\xff"

Functions

static int yaml_parser_set_reader_error (yaml_parser_t *parser, const char *problem, size_t offset, int value)
static int yaml_parser_update_raw_buffer (yaml_parser_t *parser)
static int yaml_parser_determine_encoding (yaml_parser_t *parser)
 yaml_parser_update_buffer (yaml_parser_t *parser, size_t length)


Define Documentation

#define BOM_UTF16BE   "\xfe\xff"

Definition at line 43 of file reader.c.

Referenced by yaml_parser_determine_encoding().

#define BOM_UTF16LE   "\xff\xfe"

Definition at line 42 of file reader.c.

Referenced by yaml_parser_determine_encoding().

#define BOM_UTF8   "\xef\xbb\xbf"

Definition at line 41 of file reader.c.

Referenced by yaml_parser_determine_encoding().


Function Documentation

static int yaml_parser_determine_encoding ( yaml_parser_t parser  )  [static]

Definition at line 51 of file reader.c.

References BOM_UTF16BE, BOM_UTF16LE, BOM_UTF8, yaml_parser_s::encoding, yaml_parser_s::eof, yaml_parser_s::last, memcmp(), yaml_parser_s::offset, yaml_parser_s::pointer, yaml_parser_s::raw_buffer, yaml_parser_update_raw_buffer(), YAML_UTF16BE_ENCODING, YAML_UTF16LE_ENCODING, and YAML_UTF8_ENCODING.

Referenced by yaml_parser_update_buffer().

static int yaml_parser_set_reader_error ( yaml_parser_t parser,
const char *  problem,
size_t  offset,
int  value 
) [static]

Definition at line 26 of file reader.c.

References YAML_READER_ERROR.

Referenced by yaml_parser_update_buffer(), and yaml_parser_update_raw_buffer().

yaml_parser_update_buffer ( yaml_parser_t parser,
size_t  length 
)

Definition at line 142 of file reader.c.

References assert, if(), memmove(), size, yaml_parser_determine_encoding(), yaml_parser_set_reader_error(), yaml_parser_update_raw_buffer(), YAML_UTF16BE_ENCODING, YAML_UTF16LE_ENCODING, and YAML_UTF8_ENCODING.

static int yaml_parser_update_raw_buffer ( yaml_parser_t parser  )  [static]

Definition at line 94 of file reader.c.

References yaml_parser_s::end, yaml_parser_s::eof, yaml_parser_s::last, memmove(), yaml_parser_s::offset, yaml_parser_s::pointer, yaml_parser_s::raw_buffer, yaml_parser_s::read_handler, yaml_parser_s::read_handler_data, yaml_parser_s::start, and yaml_parser_set_reader_error().

Referenced by yaml_parser_determine_encoding(), and yaml_parser_update_buffer().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7