Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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

Go to the source code of this file.

## Functions
| yaml_get_version_string (void)
| Get the library version as a string. More...
| yaml_get_version (int *major, int *minor, int *patch)
| Get the library version numbers. More...
| yaml_malloc (size_t size)
| yaml_realloc (void *ptr, size_t size)
| yaml_free (void *ptr)
| yaml_strdup (const yaml_char_t *str)
| yaml_string_extend (yaml_char_t **start, yaml_char_t **pointer, yaml_char_t **end)
| yaml_string_join (yaml_char_t **a_start, yaml_char_t **a_pointer, yaml_char_t **a_end, yaml_char_t **b_start, yaml_char_t **b_pointer, yaml_char_t **b_end)
| yaml_stack_extend (void **start, void **top, void **end)
| yaml_queue_extend (void **start, void **head, void **tail, void **end)
| yaml_parser_initialize (yaml_parser_t *parser)
| Initialize a parser. More...
| yaml_parser_delete (yaml_parser_t *parser)
| Destroy a parser. More...
static int | yaml_string_read_handler (void *data, unsigned char *buffer, size_t size, size_t *size_read)
static int | yaml_file_read_handler (void *data, unsigned char *buffer, size_t size, size_t *size_read)
| yaml_parser_set_input_string (yaml_parser_t *parser, const unsigned char *input, size_t size)
| Set a string input. More...
| yaml_parser_set_input_file (yaml_parser_t *parser, FILE *file)
| Set a file input. More...
| yaml_parser_set_input (yaml_parser_t *parser, yaml_read_handler_t *handler, void *data)
| Set a generic input handler. More...
| yaml_parser_set_encoding (yaml_parser_t *parser, yaml_encoding_t encoding)
| Set the source encoding. More...
| yaml_emitter_initialize (yaml_emitter_t *emitter)
| Initialize an emitter. More...
| yaml_emitter_delete (yaml_emitter_t *emitter)
| Destroy an emitter. More...
static int | yaml_string_write_handler (void *data, unsigned char *buffer, size_t size)
static int | yaml_file_write_handler (void *data, unsigned char *buffer, size_t size)
| yaml_emitter_set_output_string (yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written)
| Set a string output. More...
| yaml_emitter_set_output_file (yaml_emitter_t *emitter, FILE *file)
| Set a file output. More...
| yaml_emitter_set_output (yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data)
| Set a generic output handler. More...
| yaml_emitter_set_encoding (yaml_emitter_t *emitter, yaml_encoding_t encoding)
| Set the output encoding. More...
| yaml_emitter_set_canonical (yaml_emitter_t *emitter, int canonical)
| Set if the output should be in the "canonical" format as in the YAML specification. More...
| yaml_emitter_set_indent (yaml_emitter_t *emitter, int indent)
| Set the intendation increment. More...
| yaml_emitter_set_width (yaml_emitter_t *emitter, int width)
| Set the preferred line width. More...
| yaml_emitter_set_unicode (yaml_emitter_t *emitter, int unicode)
| Set if unescaped non-ASCII characters are allowed. More...
| yaml_emitter_set_break (yaml_emitter_t *emitter, yaml_break_t line_break)
| Set the preferred line break. More...
| yaml_token_delete (yaml_token_t *token)
| Free any memory allocated for a token object. More...
static int | yaml_check_utf8 (yaml_char_t *start, size_t length)
| yaml_stream_start_event_initialize (yaml_event_t *event, yaml_encoding_t encoding)
| Create the STREAM-START event. More...
| yaml_stream_end_event_initialize (yaml_event_t *event)
| Create the STREAM-END event. More...
| yaml_document_start_event_initialize (yaml_event_t *event, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int implicit)
| Create the DOCUMENT-START event. More...
| yaml_document_end_event_initialize (yaml_event_t *event, int implicit)
| Create the DOCUMENT-END event. More...
| yaml_alias_event_initialize (yaml_event_t *event, yaml_char_t *anchor)
| Create an ALIAS event. More...
| yaml_scalar_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, yaml_char_t *value, int length, int plain_implicit, int quoted_implicit, yaml_scalar_style_t style)
| Create a SCALAR event. More...
| yaml_sequence_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_sequence_style_t style)
| Create a SEQUENCE-START event. More...
| yaml_sequence_end_event_initialize (yaml_event_t *event)
| Create a SEQUENCE-END event. More...
| yaml_mapping_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_mapping_style_t style)
| Create a MAPPING-START event. More...
| yaml_mapping_end_event_initialize (yaml_event_t *event)
| Create a MAPPING-END event. More...
| yaml_event_delete (yaml_event_t *event)
| Free any memory allocated for an event object. More...
| yaml_document_initialize (yaml_document_t *document, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int start_implicit, int end_implicit)
| Create a YAML document. More...
| yaml_document_delete (yaml_document_t *document)
| Delete a YAML document and all its nodes. More...
| yaml_document_get_node (yaml_document_t *document, int index)
| Get a document node. More...
| yaml_document_get_root_node (yaml_document_t *document)
| Get the root object. More...
| yaml_document_add_scalar (yaml_document_t *document, yaml_char_t *tag, yaml_char_t *value, int length, yaml_scalar_style_t style)
| Create a SCALAR node and attach it to the document. More...
| yaml_document_add_sequence (yaml_document_t *document, yaml_char_t *tag, yaml_sequence_style_t style)
| Create a SEQUENCE node and attach it to the document. More...
| yaml_document_add_mapping (yaml_document_t *document, yaml_char_t *tag, yaml_mapping_style_t style)
| Create a MAPPING node and attach it to the document. More...
| yaml_document_append_sequence_item (yaml_document_t *document, int sequence, int item)
| Add an item to a SEQUENCE node. More...
| yaml_document_append_mapping_pair (yaml_document_t *document, int mapping, int key, int value)
| Add a pair of a key and a value to a MAPPING node. More...

## Function Documentation

static int yaml_check_utf8 | ( | yaml_char_t * | start,
|  | size_t | length
| ) |  |
| static

Definition at line 620 of file api.c.

Referenced by yaml_alias_event_initialize(), yaml_document_add_mapping(), yaml_document_add_scalar(), yaml_document_add_sequence(), yaml_document_initialize(), yaml_document_start_event_initialize(), yaml_mapping_start_event_initialize(), yaml_scalar_event_initialize(), and yaml_sequence_start_event_initialize().

static int yaml_file_read_handler | ( | void * | data,
|  | unsigned char * | buffer,
|  | size_t | size,
|  | size_t * | size_read
| ) |  |
| static

Definition at line 269 of file api.c.

References ferror, yaml_parser_s::file, and yaml_parser_s::input.

Referenced by yaml_parser_set_input_file().

static int yaml_file_write_handler | ( | void * | data,
|  | unsigned char * | buffer,
|  | size_t | size
| ) |  |
| static

Definition at line 440 of file api.c.

References yaml_emitter_s::file, and yaml_emitter_s::output.

Referenced by yaml_emitter_set_output_file().

yaml_free | ( | void * | ptr) |  |

Definition at line 51 of file api.c.

References free().

Referenced by yaml_document_add_mapping(), yaml_document_add_scalar(), yaml_document_add_sequence(), yaml_document_delete(), yaml_document_initialize(), yaml_document_start_event_initialize(), yaml_emitter_append_tag_directive(), yaml_emitter_delete(), yaml_emitter_delete_document_and_anchors(), yaml_emitter_emit_document_end(), yaml_event_delete(), yaml_mapping_start_event_initialize(), yaml_parser_append_tag_directive(), yaml_parser_delete(), yaml_parser_delete_aliases(), yaml_parser_load_alias(), yaml_parser_load_mapping(), yaml_parser_load_scalar(), yaml_parser_load_sequence(), yaml_parser_parse_document_end(), yaml_parser_parse_document_start(), yaml_parser_parse_node(), yaml_parser_process_directives(), yaml_parser_register_anchor(), yaml_parser_scan_directive(), yaml_parser_scan_tag(), yaml_parser_scan_tag_directive_value(), yaml_scalar_event_initialize(), yaml_sequence_start_event_initialize(), and yaml_token_delete().

yaml_malloc | ( | size_t | size) |  |

Definition at line 31 of file api.c.

References malloc.

Referenced by yaml_document_add_scalar(), yaml_document_initialize(), yaml_document_start_event_initialize(), yaml_emitter_dump(), yaml_emitter_generate_anchor(), yaml_parser_parse_node(), yaml_parser_process_directives(), yaml_parser_process_empty_scalar(), yaml_parser_scan_tag(), and yaml_scalar_event_initialize().

yaml_queue_extend | ( | void ** | start,
|  | void ** | head,
|  | void ** | tail,
|  | void ** | end
| ) |  |

Definition at line 136 of file api.c.

References memmove(), and yaml_realloc().

yaml_realloc | ( | void * | ptr,
|  | size_t | size
| ) |  |

Definition at line 41 of file api.c.

References malloc, and realloc.

Referenced by yaml_queue_extend(), yaml_stack_extend(), and yaml_string_extend().

yaml_stack_extend | ( | void ** | start,
|  | void ** | top,
|  | void ** | end
| ) |  |

Definition at line 118 of file api.c.

References yaml_realloc().

yaml_strdup | ( | const yaml_char_t * | str) |  |

Definition at line 61 of file api.c.

References NULL, and strdup.

Referenced by yaml_alias_event_initialize(), yaml_document_add_mapping(), yaml_document_add_scalar(), yaml_document_add_sequence(), yaml_document_initialize(), yaml_document_start_event_initialize(), yaml_emitter_append_tag_directive(), yaml_mapping_start_event_initialize(), yaml_parser_append_tag_directive(), yaml_parser_load_mapping(), yaml_parser_load_scalar(), yaml_parser_load_sequence(), yaml_scalar_event_initialize(), and yaml_sequence_start_event_initialize().

yaml_string_extend | ( | yaml_char_t ** | start,
|  | yaml_char_t ** | pointer,
|  | yaml_char_t ** | end
| ) |  |

Definition at line 74 of file api.c.

References yaml_realloc().

Referenced by yaml_parser_scan_tag_uri(), and yaml_string_join().

yaml_string_join | ( | yaml_char_t ** | a_start,
|  | yaml_char_t ** | a_pointer,
|  | yaml_char_t ** | a_end,
|  | yaml_char_t ** | b_start,
|  | yaml_char_t ** | b_pointer,
|  | yaml_char_t ** | b_end
| ) |  |

Definition at line 95 of file api.c.

References yaml_string_extend().

static int yaml_string_read_handler | ( | void * | data,
|  | unsigned char * | buffer,
|  | size_t | size,
|  | size_t * | size_read
| ) |  |
| static

Definition at line 243 of file api.c.

References yaml_parser_s::input, size, and yaml_parser_s::string.

Referenced by yaml_parser_set_input_string().

static int yaml_string_write_handler | ( | void * | data,
|  | unsigned char * | buffer,
|  | size_t | size
| ) |  |
| static

Definition at line 414 of file api.c.

References yaml_emitter_s::output, size, and yaml_emitter_s::string.

Referenced by yaml_emitter_set_output_string().