Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions
reader.c File Reference
`#include "yaml_private.h"`
Include dependency graph for reader.c:

Go to the source code of this file.

## Macros
#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)

## Macro Definition 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, 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().