Ruby
2.1.3p242(2014-09-19revision47630)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
psych
yaml
yaml.h
Go to the documentation of this file.
1
11
#ifndef YAML_H
12
#define YAML_H
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
18
#include <stdlib.h>
19
#include <stdio.h>
20
#include <string.h>
21
29
#ifdef _WIN32
30
# if defined(YAML_DECLARE_STATIC)
31
# define YAML_DECLARE(type) type
32
# elif defined(YAML_DECLARE_EXPORT)
33
# define YAML_DECLARE(type) __declspec(dllexport) type
34
# else
35
# define YAML_DECLARE(type) __declspec(dllimport) type
36
# endif
37
#else
38
# define YAML_DECLARE(type) type
39
#endif
40
56
YAML_DECLARE
(
const
char
*)
57
yaml_get_version_string
(
void
);
58
67
YAML_DECLARE
(
void
)
68
yaml_get_version
(
int
*
major
,
int
*
minor
,
int
*patch);
69
78
typedef
unsigned
char
yaml_char_t
;
79
81
typedef struct
yaml_version_directive_s
{
83
int
major
;
85
int
minor
;
86
}
yaml_version_directive_t
;
87
89
typedef
struct
yaml_tag_directive_s
{
91
yaml_char_t
*
handle
;
93
yaml_char_t
*
prefix
;
94
}
yaml_tag_directive_t
;
95
97
typedef
enum
yaml_encoding_e
{
99
YAML_ANY_ENCODING
,
101
YAML_UTF8_ENCODING
,
103
YAML_UTF16LE_ENCODING
,
105
YAML_UTF16BE_ENCODING
106
}
yaml_encoding_t
;
107
110
typedef
enum
yaml_break_e
{
112
YAML_ANY_BREAK
,
114
YAML_CR_BREAK
,
116
YAML_LN_BREAK
,
118
YAML_CRLN_BREAK
119
}
yaml_break_t
;
120
122
typedef
enum
yaml_error_type_e
{
124
YAML_NO_ERROR
,
125
127
YAML_MEMORY_ERROR
,
128
130
YAML_READER_ERROR
,
132
YAML_SCANNER_ERROR
,
134
YAML_PARSER_ERROR
,
136
YAML_COMPOSER_ERROR
,
137
139
YAML_WRITER_ERROR
,
141
YAML_EMITTER_ERROR
142
}
yaml_error_type_t
;
143
145
typedef
struct
yaml_mark_s
{
147
size_t
index
;
148
150
size_t
line
;
151
153
size_t
column
;
154
}
yaml_mark_t
;
155
164
typedef
enum
yaml_scalar_style_e
{
166
YAML_ANY_SCALAR_STYLE
,
167
169
YAML_PLAIN_SCALAR_STYLE
,
170
172
YAML_SINGLE_QUOTED_SCALAR_STYLE
,
174
YAML_DOUBLE_QUOTED_SCALAR_STYLE
,
175
177
YAML_LITERAL_SCALAR_STYLE
,
179
YAML_FOLDED_SCALAR_STYLE
180
}
yaml_scalar_style_t
;
181
183
typedef
enum
yaml_sequence_style_e
{
185
YAML_ANY_SEQUENCE_STYLE
,
186
188
YAML_BLOCK_SEQUENCE_STYLE
,
190
YAML_FLOW_SEQUENCE_STYLE
191
}
yaml_sequence_style_t
;
192
194
typedef
enum
yaml_mapping_style_e
{
196
YAML_ANY_MAPPING_STYLE
,
197
199
YAML_BLOCK_MAPPING_STYLE
,
201
YAML_FLOW_MAPPING_STYLE
202
/* YAML_FLOW_SET_MAPPING_STYLE */
203
}
yaml_mapping_style_t
;
204
213
typedef
enum
yaml_token_type_e
{
215
YAML_NO_TOKEN
,
216
218
YAML_STREAM_START_TOKEN
,
220
YAML_STREAM_END_TOKEN
,
221
223
YAML_VERSION_DIRECTIVE_TOKEN
,
225
YAML_TAG_DIRECTIVE_TOKEN
,
227
YAML_DOCUMENT_START_TOKEN
,
229
YAML_DOCUMENT_END_TOKEN
,
230
232
YAML_BLOCK_SEQUENCE_START_TOKEN
,
234
YAML_BLOCK_MAPPING_START_TOKEN
,
236
YAML_BLOCK_END_TOKEN
,
237
239
YAML_FLOW_SEQUENCE_START_TOKEN
,
241
YAML_FLOW_SEQUENCE_END_TOKEN
,
243
YAML_FLOW_MAPPING_START_TOKEN
,
245
YAML_FLOW_MAPPING_END_TOKEN
,
246
248
YAML_BLOCK_ENTRY_TOKEN
,
250
YAML_FLOW_ENTRY_TOKEN
,
252
YAML_KEY_TOKEN
,
254
YAML_VALUE_TOKEN
,
255
257
YAML_ALIAS_TOKEN
,
259
YAML_ANCHOR_TOKEN
,
261
YAML_TAG_TOKEN
,
263
YAML_SCALAR_TOKEN
264
}
yaml_token_type_t
;
265
267
typedef
struct
yaml_token_s
{
268
270
yaml_token_type_t
type
;
271
273
union
{
274
276
struct
{
278
yaml_encoding_t
encoding
;
279
}
stream_start
;
280
282
struct
{
284
yaml_char_t
*
value
;
285
}
alias
;
286
288
struct
{
290
yaml_char_t
*
value
;
291
}
anchor
;
292
294
struct
{
296
yaml_char_t
*
handle
;
298
yaml_char_t
*
suffix
;
299
}
tag
;
300
302
struct
{
304
yaml_char_t
*
value
;
306
size_t
length
;
308
yaml_scalar_style_t
style
;
309
}
scalar
;
310
312
struct
{
314
int
major
;
316
int
minor
;
317
}
version_directive
;
318
320
struct
{
322
yaml_char_t
*
handle
;
324
yaml_char_t
*
prefix
;
325
}
tag_directive
;
326
327
}
data
;
328
330
yaml_mark_t
start_mark
;
332
yaml_mark_t
end_mark
;
333
334
}
yaml_token_t
;
335
342
YAML_DECLARE
(
void
)
343
yaml_token_delete
(
yaml_token_t
*
token
);
344
353
typedef enum
yaml_event_type_e
{
355
YAML_NO_EVENT
,
356
358
YAML_STREAM_START_EVENT
,
360
YAML_STREAM_END_EVENT
,
361
363
YAML_DOCUMENT_START_EVENT
,
365
YAML_DOCUMENT_END_EVENT
,
366
368
YAML_ALIAS_EVENT
,
370
YAML_SCALAR_EVENT
,
371
373
YAML_SEQUENCE_START_EVENT
,
375
YAML_SEQUENCE_END_EVENT
,
376
378
YAML_MAPPING_START_EVENT
,
380
YAML_MAPPING_END_EVENT
381
}
yaml_event_type_t
;
382
384
typedef
struct
yaml_event_s
{
385
387
yaml_event_type_t
type
;
388
390
union
{
391
393
struct
{
395
yaml_encoding_t
encoding
;
396
}
stream_start
;
397
399
struct
{
401
yaml_version_directive_t
*
version_directive
;
402
404
struct
{
406
yaml_tag_directive_t
*
start
;
408
yaml_tag_directive_t
*
end
;
409
}
tag_directives
;
410
412
int
implicit
;
413
}
document_start
;
414
416
struct
{
418
int
implicit
;
419
}
document_end
;
420
422
struct
{
424
yaml_char_t
*
anchor
;
425
}
alias
;
426
428
struct
{
430
yaml_char_t
*
anchor
;
432
yaml_char_t
*
tag
;
434
yaml_char_t
*
value
;
436
size_t
length
;
438
int
plain_implicit
;
440
int
quoted_implicit
;
442
yaml_scalar_style_t
style
;
443
}
scalar
;
444
446
struct
{
448
yaml_char_t
*
anchor
;
450
yaml_char_t
*
tag
;
452
int
implicit
;
454
yaml_sequence_style_t
style
;
455
}
sequence_start
;
456
458
struct
{
460
yaml_char_t
*
anchor
;
462
yaml_char_t
*
tag
;
464
int
implicit
;
466
yaml_mapping_style_t
style
;
467
}
mapping_start
;
468
469
}
data
;
470
472
yaml_mark_t
start_mark
;
474
yaml_mark_t
end_mark
;
475
476
}
yaml_event_t
;
477
487
YAML_DECLARE
(
int
)
488
yaml_stream_start_event_initialize
(
yaml_event_t
*event,
489
yaml_encoding_t
encoding);
490
499
YAML_DECLARE
(
int
)
500
yaml_stream_end_event_initialize
(
yaml_event_t
*event);
501
521
YAML_DECLARE
(
int
)
522
yaml_document_start_event_initialize
(
yaml_event_t
*event,
523
yaml_version_directive_t
*version_directive,
524
yaml_tag_directive_t
*tag_directives_start,
525
yaml_tag_directive_t
*tag_directives_end,
526
int
implicit);
527
540
YAML_DECLARE
(
int
)
541
yaml_document_end_event_initialize
(
yaml_event_t
*event,
int
implicit);
542
552
YAML_DECLARE
(
int
)
553
yaml_alias_event_initialize
(
yaml_event_t
*event,
yaml_char_t
*anchor);
554
577
YAML_DECLARE
(
int
)
578
yaml_scalar_event_initialize
(
yaml_event_t
*event,
579
yaml_char_t
*anchor,
yaml_char_t
*tag,
580
yaml_char_t
*value,
int
length,
581
int
plain_implicit,
int
quoted_implicit,
582
yaml_scalar_style_t
style);
583
600
YAML_DECLARE
(
int
)
601
yaml_sequence_start_event_initialize
(
yaml_event_t
*event,
602
yaml_char_t
*anchor,
yaml_char_t
*tag,
int
implicit,
603
yaml_sequence_style_t
style);
604
613
YAML_DECLARE
(
int
)
614
yaml_sequence_end_event_initialize
(
yaml_event_t
*event);
615
632
YAML_DECLARE
(
int
)
633
yaml_mapping_start_event_initialize
(
yaml_event_t
*event,
634
yaml_char_t
*anchor,
yaml_char_t
*tag,
int
implicit,
635
yaml_mapping_style_t
style);
636
645
YAML_DECLARE
(
int
)
646
yaml_mapping_end_event_initialize
(
yaml_event_t
*event);
647
654
YAML_DECLARE
(
void
)
655
yaml_event_delete
(
yaml_event_t
*event);
656
665
#define YAML_NULL_TAG "tag:yaml.org,2002:null"
666
667
#define YAML_BOOL_TAG "tag:yaml.org,2002:bool"
668
669
#define YAML_STR_TAG "tag:yaml.org,2002:str"
670
671
#define YAML_INT_TAG "tag:yaml.org,2002:int"
672
673
#define YAML_FLOAT_TAG "tag:yaml.org,2002:float"
674
675
#define YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp"
676
678
#define YAML_SEQ_TAG "tag:yaml.org,2002:seq"
679
680
#define YAML_MAP_TAG "tag:yaml.org,2002:map"
681
683
#define YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG
684
685
#define YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG
686
687
#define YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG
688
690
typedef
enum
yaml_node_type_e
{
692
YAML_NO_NODE
,
693
695
YAML_SCALAR_NODE
,
697
YAML_SEQUENCE_NODE
,
699
YAML_MAPPING_NODE
700
}
yaml_node_type_t
;
701
703
typedef
struct
yaml_node_s
yaml_node_t
;
704
706
typedef
int
yaml_node_item_t
;
707
709
typedef
struct
yaml_node_pair_s
{
711
int
key
;
713
int
value
;
714
}
yaml_node_pair_t
;
715
717
struct
yaml_node_s
{
718
720
yaml_node_type_t
type
;
721
723
yaml_char_t
*
tag
;
724
726
union
{
727
729
struct
{
731
yaml_char_t
*
value
;
733
size_t
length
;
735
yaml_scalar_style_t
style
;
736
}
scalar
;
737
739
struct
{
741
struct
{
743
yaml_node_item_t *
start
;
745
yaml_node_item_t *
end
;
747
yaml_node_item_t *
top
;
748
}
items
;
750
yaml_sequence_style_t
style
;
751
}
sequence
;
752
754
struct
{
756
struct
{
758
yaml_node_pair_t
*
start
;
760
yaml_node_pair_t
*
end
;
762
yaml_node_pair_t
*
top
;
763
}
pairs
;
765
yaml_mapping_style_t
style
;
766
}
mapping
;
767
768
}
data
;
769
771
yaml_mark_t
start_mark
;
773
yaml_mark_t
end_mark
;
774
775
};
776
778
typedef
struct
yaml_document_s
{
779
781
struct
{
783
yaml_node_t
*
start
;
785
yaml_node_t
*
end
;
787
yaml_node_t
*
top
;
788
}
nodes
;
789
791
yaml_version_directive_t
*
version_directive
;
792
794
struct
{
796
yaml_tag_directive_t
*
start
;
798
yaml_tag_directive_t
*
end
;
799
}
tag_directives
;
800
802
int
start_implicit
;
804
int
end_implicit
;
805
807
yaml_mark_t
start_mark
;
809
yaml_mark_t
end_mark
;
810
811
}
yaml_document_t
;
812
831
YAML_DECLARE
(
int
)
832
yaml_document_initialize
(
yaml_document_t
*document,
833
yaml_version_directive_t
*version_directive,
834
yaml_tag_directive_t
*tag_directives_start,
835
yaml_tag_directive_t
*tag_directives_end,
836
int
start_implicit,
int
end_implicit);
837
844
YAML_DECLARE
(
void
)
845
yaml_document_delete
(
yaml_document_t
*document);
846
859
YAML_DECLARE
(
yaml_node_t
*)
860
yaml_document_get_node
(
yaml_document_t
*document,
int
index);
861
878
YAML_DECLARE
(
yaml_node_t
*)
879
yaml_document_get_root_node
(
yaml_document_t
*document);
880
895
YAML_DECLARE
(
int
)
896
yaml_document_add_scalar
(
yaml_document_t
*document,
897
yaml_char_t
*tag,
yaml_char_t
*value,
int
length,
898
yaml_scalar_style_t
style);
899
912
YAML_DECLARE
(
int
)
913
yaml_document_add_sequence
(
yaml_document_t
*document,
914
yaml_char_t
*tag,
yaml_sequence_style_t
style);
915
928
YAML_DECLARE
(
int
)
929
yaml_document_add_mapping
(
yaml_document_t
*document,
930
yaml_char_t
*tag,
yaml_mapping_style_t
style);
931
942
YAML_DECLARE
(
int
)
943
yaml_document_append_sequence_item
(
yaml_document_t
*document,
944
int
sequence,
int
item);
945
957
YAML_DECLARE
(
int
)
958
yaml_document_append_mapping_pair
(
yaml_document_t
*document,
959
int
mapping,
int
key
,
int
value);
960
986
typedef
int
yaml_read_handler_t
(
void
*data,
unsigned
char
*buffer,
size_t
size
,
987
size_t
*size_read);
988
993
typedef struct
yaml_simple_key_s
{
995
int
possible
;
996
998
int
required
;
999
1001
size_t
token_number
;
1002
1004
yaml_mark_t
mark
;
1005
}
yaml_simple_key_t
;
1006
1010
typedef
enum
yaml_parser_state_e
{
1012
YAML_PARSE_STREAM_START_STATE
,
1014
YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE
,
1016
YAML_PARSE_DOCUMENT_START_STATE
,
1018
YAML_PARSE_DOCUMENT_CONTENT_STATE
,
1020
YAML_PARSE_DOCUMENT_END_STATE
,
1022
YAML_PARSE_BLOCK_NODE_STATE
,
1024
YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE
,
1026
YAML_PARSE_FLOW_NODE_STATE
,
1028
YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE
,
1030
YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE
,
1032
YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE
,
1034
YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE
,
1036
YAML_PARSE_BLOCK_MAPPING_KEY_STATE
,
1038
YAML_PARSE_BLOCK_MAPPING_VALUE_STATE
,
1040
YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE
,
1042
YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE
,
1044
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE
,
1046
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE
,
1048
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE
,
1050
YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE
,
1052
YAML_PARSE_FLOW_MAPPING_KEY_STATE
,
1054
YAML_PARSE_FLOW_MAPPING_VALUE_STATE
,
1056
YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE
,
1058
YAML_PARSE_END_STATE
1059
}
yaml_parser_state_t
;
1060
1065
typedef
struct
yaml_alias_data_s
{
1067
yaml_char_t
*
anchor
;
1069
int
index
;
1071
yaml_mark_t
mark
;
1072
}
yaml_alias_data_t
;
1073
1081
typedef
struct
yaml_parser_s
{
1082
1089
yaml_error_type_t
error
;
1091
const
char
*
problem
;
1093
size_t
problem_offset
;
1095
int
problem_value
;
1097
yaml_mark_t
problem_mark
;
1099
const
char
*
context
;
1101
yaml_mark_t
context_mark
;
1102
1113
yaml_read_handler_t
*
read_handler
;
1114
1116
void
*
read_handler_data
;
1117
1119
union
{
1121
struct
{
1123
const
unsigned
char
*
start
;
1125
const
unsigned
char
*
end
;
1127
const
unsigned
char
*
current
;
1128
}
string
;
1129
1131
FILE
*
file
;
1132
}
input
;
1133
1135
int
eof
;
1136
1138
struct
{
1140
yaml_char_t
*
start
;
1142
yaml_char_t
*
end
;
1144
yaml_char_t
*
pointer
;
1146
yaml_char_t
*
last
;
1147
}
buffer
;
1148
1149
/* The number of unread characters in the buffer. */
1150
size_t
unread
;
1151
1153
struct
{
1155
unsigned
char
*
start
;
1157
unsigned
char
*
end
;
1159
unsigned
char
*
pointer
;
1161
unsigned
char
*
last
;
1162
}
raw_buffer
;
1163
1165
yaml_encoding_t
encoding
;
1166
1168
size_t
offset
;
1169
1171
yaml_mark_t
mark
;
1172
1183
int
stream_start_produced
;
1184
1186
int
stream_end_produced
;
1187
1189
int
flow_level
;
1190
1192
struct
{
1194
yaml_token_t
*
start
;
1196
yaml_token_t
*
end
;
1198
yaml_token_t
*
head
;
1200
yaml_token_t
*
tail
;
1201
}
tokens
;
1202
1204
size_t
tokens_parsed
;
1205
1206
/* Does the tokens queue contain a token ready for dequeueing. */
1207
int
token_available
;
1208
1210
struct
{
1212
int
*
start
;
1214
int
*
end
;
1216
int
*
top
;
1217
}
indents
;
1218
1220
int
indent
;
1221
1223
int
simple_key_allowed
;
1224
1226
struct
{
1228
yaml_simple_key_t
*
start
;
1230
yaml_simple_key_t
*
end
;
1232
yaml_simple_key_t
*
top
;
1233
}
simple_keys
;
1234
1245
struct
{
1247
yaml_parser_state_t
*
start
;
1249
yaml_parser_state_t
*
end
;
1251
yaml_parser_state_t
*
top
;
1252
}
states
;
1253
1255
yaml_parser_state_t
state
;
1256
1258
struct
{
1260
yaml_mark_t
*
start
;
1262
yaml_mark_t
*
end
;
1264
yaml_mark_t
*
top
;
1265
}
marks
;
1266
1268
struct
{
1270
yaml_tag_directive_t
*
start
;
1272
yaml_tag_directive_t
*
end
;
1274
yaml_tag_directive_t
*
top
;
1275
}
tag_directives
;
1276
1287
struct
{
1289
yaml_alias_data_t
*
start
;
1291
yaml_alias_data_t
*
end
;
1293
yaml_alias_data_t
*
top
;
1294
}
aliases
;
1295
1297
yaml_document_t
*
document
;
1298
1303
}
yaml_parser_t
;
1304
1316
YAML_DECLARE
(
int
)
1317
yaml_parser_initialize
(
yaml_parser_t
*parser);
1318
1325
YAML_DECLARE
(
void
)
1326
yaml_parser_delete
(
yaml_parser_t
*parser);
1327
1340
YAML_DECLARE
(
void
)
1341
yaml_parser_set_input_string
(
yaml_parser_t
*parser,
1342
const
unsigned
char
*
input
,
size_t
size
);
1343
1354
YAML_DECLARE
(
void
)
1355
yaml_parser_set_input_file
(
yaml_parser_t
*parser,
FILE
*file);
1356
1366
YAML_DECLARE
(
void
)
1367
yaml_parser_set_input
(
yaml_parser_t
*parser,
1368
yaml_read_handler_t
*handler,
void
*data);
1369
1377
YAML_DECLARE
(
void
)
1378
yaml_parser_set_encoding
(
yaml_parser_t
*parser,
yaml_encoding_t
encoding);
1379
1401
YAML_DECLARE
(
int
)
1402
yaml_parser_scan
(
yaml_parser_t
*parser,
yaml_token_t
*
token
);
1403
1425
YAML_DECLARE
(
int
)
1426
yaml_parser_parse
(
yaml_parser_t
*parser,
yaml_event_t
*event);
1427
1450
YAML_DECLARE
(
int
)
1451
yaml_parser_load
(
yaml_parser_t
*parser,
yaml_document_t
*document);
1452
1476
typedef
int
yaml_write_handler_t
(
void
*data,
unsigned
char
*buffer,
size_t
size);
1477
1479
typedef enum
yaml_emitter_state_e
{
1481
YAML_EMIT_STREAM_START_STATE
,
1483
YAML_EMIT_FIRST_DOCUMENT_START_STATE
,
1485
YAML_EMIT_DOCUMENT_START_STATE
,
1487
YAML_EMIT_DOCUMENT_CONTENT_STATE
,
1489
YAML_EMIT_DOCUMENT_END_STATE
,
1491
YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE
,
1493
YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE
,
1495
YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE
,
1497
YAML_EMIT_FLOW_MAPPING_KEY_STATE
,
1499
YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE
,
1501
YAML_EMIT_FLOW_MAPPING_VALUE_STATE
,
1503
YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE
,
1505
YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE
,
1507
YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE
,
1509
YAML_EMIT_BLOCK_MAPPING_KEY_STATE
,
1511
YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE
,
1513
YAML_EMIT_BLOCK_MAPPING_VALUE_STATE
,
1515
YAML_EMIT_END_STATE
1516
}
yaml_emitter_state_t
;
1517
1525
typedef
struct
yaml_emitter_s
{
1526
1533
yaml_error_type_t
error
;
1535
const
char
*
problem
;
1536
1547
yaml_write_handler_t
*
write_handler
;
1548
1550
void
*
write_handler_data
;
1551
1553
union
{
1555
struct
{
1557
unsigned
char
*
buffer
;
1559
size_t
size
;
1561
size_t
*
size_written
;
1562
}
string
;
1563
1565
FILE
*
file
;
1566
}
output
;
1567
1569
struct
{
1571
yaml_char_t
*
start
;
1573
yaml_char_t
*
end
;
1575
yaml_char_t
*
pointer
;
1577
yaml_char_t
*
last
;
1578
}
buffer
;
1579
1581
struct
{
1583
unsigned
char
*
start
;
1585
unsigned
char
*
end
;
1587
unsigned
char
*
pointer
;
1589
unsigned
char
*
last
;
1590
}
raw_buffer
;
1591
1593
yaml_encoding_t
encoding
;
1594
1605
int
canonical
;
1607
int
best_indent
;
1609
int
best_width
;
1611
int
unicode
;
1613
yaml_break_t
line_break
;
1614
1616
struct
{
1618
yaml_emitter_state_t
*
start
;
1620
yaml_emitter_state_t
*
end
;
1622
yaml_emitter_state_t
*
top
;
1623
}
states
;
1624
1626
yaml_emitter_state_t
state
;
1627
1629
struct
{
1631
yaml_event_t
*
start
;
1633
yaml_event_t
*
end
;
1635
yaml_event_t
*
head
;
1637
yaml_event_t
*
tail
;
1638
}
events
;
1639
1641
struct
{
1643
int
*
start
;
1645
int
*
end
;
1647
int
*
top
;
1648
}
indents
;
1649
1651
struct
{
1653
yaml_tag_directive_t
*
start
;
1655
yaml_tag_directive_t
*
end
;
1657
yaml_tag_directive_t
*
top
;
1658
}
tag_directives
;
1659
1661
int
indent
;
1662
1664
int
flow_level
;
1665
1667
int
root_context
;
1669
int
sequence_context
;
1671
int
mapping_context
;
1673
int
simple_key_context
;
1674
1676
int
line
;
1678
int
column
;
1680
int
whitespace
;
1682
int
indention
;
1684
int
open_ended
;
1685
1687
struct
{
1689
yaml_char_t
*
anchor
;
1691
size_t
anchor_length
;
1693
int
alias
;
1694
}
anchor_data
;
1695
1697
struct
{
1699
yaml_char_t
*
handle
;
1701
size_t
handle_length
;
1703
yaml_char_t
*
suffix
;
1705
size_t
suffix_length
;
1706
}
tag_data
;
1707
1709
struct
{
1711
yaml_char_t
*
value
;
1713
size_t
length
;
1715
int
multiline
;
1717
int
flow_plain_allowed
;
1719
int
block_plain_allowed
;
1721
int
single_quoted_allowed
;
1723
int
block_allowed
;
1725
yaml_scalar_style_t
style
;
1726
}
scalar_data
;
1727
1738
int
opened
;
1740
int
closed
;
1741
1743
struct
{
1745
int
references
;
1747
int
anchor
;
1749
int
serialized
;
1750
} *
anchors
;
1751
1753
int
last_anchor_id
;
1754
1756
yaml_document_t
*
document
;
1757
1762
}
yaml_emitter_t
;
1763
1775
YAML_DECLARE
(
int
)
1776
yaml_emitter_initialize
(
yaml_emitter_t
*emitter);
1777
1784
YAML_DECLARE
(
void
)
1785
yaml_emitter_delete
(
yaml_emitter_t
*emitter);
1786
1802
YAML_DECLARE
(
void
)
1803
yaml_emitter_set_output_string
(
yaml_emitter_t
*emitter,
1804
unsigned
char
*
output
,
size_t
size
,
size_t
*size_written);
1805
1816
YAML_DECLARE
(
void
)
1817
yaml_emitter_set_output_file
(
yaml_emitter_t
*emitter,
FILE
*file);
1818
1828
YAML_DECLARE
(
void
)
1829
yaml_emitter_set_output
(
yaml_emitter_t
*emitter,
1830
yaml_write_handler_t
*handler,
void
*data);
1831
1839
YAML_DECLARE
(
void
)
1840
yaml_emitter_set_encoding
(
yaml_emitter_t
*emitter,
yaml_encoding_t
encoding);
1841
1850
YAML_DECLARE
(
void
)
1851
yaml_emitter_set_canonical
(
yaml_emitter_t
*emitter,
int
canonical
);
1852
1860
YAML_DECLARE
(
void
)
1861
yaml_emitter_set_indent
(
yaml_emitter_t
*emitter,
int
indent);
1862
1870
YAML_DECLARE
(
void
)
1871
yaml_emitter_set_width
(
yaml_emitter_t
*emitter,
int
width);
1872
1880
YAML_DECLARE
(
void
)
1881
yaml_emitter_set_unicode
(
yaml_emitter_t
*emitter,
int
unicode);
1882
1890
YAML_DECLARE
(
void
)
1891
yaml_emitter_set_break
(
yaml_emitter_t
*emitter,
yaml_break_t
line_break);
1892
1907
YAML_DECLARE
(
int
)
1908
yaml_emitter_emit
(
yaml_emitter_t
*emitter,
yaml_event_t
*event);
1909
1920
YAML_DECLARE
(
int
)
1921
yaml_emitter_open
(
yaml_emitter_t
*emitter);
1922
1933
YAML_DECLARE
(
int
)
1934
yaml_emitter_close
(
yaml_emitter_t
*emitter);
1935
1950
YAML_DECLARE
(
int
)
1951
yaml_emitter_dump
(
yaml_emitter_t
*emitter,
yaml_document_t
*document);
1952
1961
YAML_DECLARE
(
int
)
1962
yaml_emitter_flush
(
yaml_emitter_t
*emitter);
1963
1966
#ifdef __cplusplus
1967
}
1968
#endif
1969
1970
#endif
/* #ifndef YAML_H */
1971
1972
Generated on Mon Sep 22 2014 11:05:27 for Ruby by
1.8.2