| 1 |
#ifndef __HELPER_H__ |
| 2 |
#define __HELPER_H__ |
| 3 |
|
| 4 |
#include <yaml.h> |
| 5 |
|
| 6 |
typedef struct buffer_s { |
| 7 |
unsigned char *buff; |
| 8 |
unsigned int size, used; |
| 9 |
} buffer_t; |
| 10 |
void buffer_init(buffer_t *buffer); |
| 11 |
int buffer_append(void *ext, unsigned char *str, size_t size); |
| 12 |
unsigned char * get_buffer_buff(buffer_t *b); |
| 13 |
unsigned int get_buffer_used(buffer_t *b); |
| 14 |
|
| 15 |
void my_emitter_set_output(yaml_emitter_t *e, buffer_t *b); |
| 16 |
|
| 17 |
char const * get_parser_error_problem(yaml_parser_t *p); |
| 18 |
char const * get_parser_error_context(yaml_parser_t *p); |
| 19 |
unsigned int get_parser_error_offset(yaml_parser_t *p); |
| 20 |
|
| 21 |
char const * get_emitter_error(yaml_emitter_t *e); |
| 22 |
|
| 23 |
int simple_document_start(yaml_event_t *e); |
| 24 |
|
| 25 |
int get_event_type(yaml_event_t *e); |
| 26 |
|
| 27 |
unsigned char * get_scalar_value(yaml_event_t *e); |
| 28 |
unsigned long get_scalar_length(yaml_event_t *e); |
| 29 |
|
| 30 |
unsigned char * get_scalar_tag(yaml_event_t *e); |
| 31 |
unsigned char * get_sequence_start_tag(yaml_event_t *e); |
| 32 |
unsigned char * get_mapping_start_tag(yaml_event_t *e); |
| 33 |
|
| 34 |
int get_scalar_style(yaml_event_t *e); |
| 35 |
int get_sequence_start_style(yaml_event_t *e); |
| 36 |
int get_mapping_start_style(yaml_event_t *e); |
| 37 |
|
| 38 |
unsigned char * get_scalar_anchor(yaml_event_t *e); |
| 39 |
unsigned char * get_sequence_start_anchor(yaml_event_t *e); |
| 40 |
unsigned char * get_mapping_start_anchor(yaml_event_t *e); |
| 41 |
unsigned char * get_alias_anchor(yaml_event_t *e); |
| 42 |
|
| 43 |
#endif /* __HELPER_H__ */ |