on master help sign in
Move over to libyaml from Github (fixes #105)
1ecada5Michael Snoyman
.gitmodulesnew file+3
@@ -0,0 +1,3 @@
1+[submodule "vendor/libyaml"]
2+ path = vendor/libyaml
3+ url = https://github.com/snoyberg/libyaml
copy-libyaml.shnew file+10
@@ -0,0 +1,10 @@
1+#!/usr/bin/env bash
2+
3+set -ex
4+
5+rm -rf libyaml
6+mkdir -p libyaml
7+cp vendor/libyaml/LICENSE libyaml
8+cp vendor/libyaml/src/*.c libyaml
9+cp vendor/libyaml/src/*.h libyaml
10+cp vendor/libyaml/include/*.h libyaml
libyaml/LICENSE+1−1
@@ -1,4 +1,4 @@
1−Copyright (c) 2006 Kirill Simonov
1+Copyright (c) 2006-2016 Kirill Simonov
2
2
3Permission is hereby granted, free of charge, to any person obtaining a copy of
3Permission is hereby granted, free of charge, to any person obtaining a copy of
4this software and associated documentation files (the "Software"), to deal in
4this software and associated documentation files (the "Software"), to deal in
libyaml/Makefiledeleted−9
@@ -1,9 +0,0 @@
1−CC = gcc
2−CFLAGS = -shared
3−OBJECTS = api.o dumper.o emitter.o loader.o parser.o reader.o scanner.o writer.o
4−LIB = libyaml.so
5−LFLAGS = -shared -Wl,-soname,libyaml.so
6−%.o: %.c
7− $(CC) $(CFLAGS) -c -fPIC $<
8−yaml: $(OBJECTS)
9− $(CC) $(LFLAGS) -o $(LIB) $(OBJECTS)
libyaml/api.c+9−11
@@ -5,15 +5,6 @@
5 * Get the library version.
5 * Get the library version.
6 */
6 */
7
7
8−/*
9− * added to support _WIN64
10− */
11−#if _WIN64
12−#define STRDUP _strdup
13−#else
14−#define STRDUP strdup
15−#endif
16−
17YAML_DECLARE(const char *)
8YAML_DECLARE(const char *)
18yaml_get_version_string(void)
9yaml_get_version_string(void)
19{
10{
@@ -72,7 +63,14 @@ yaml_strdup(const yaml_char_t *str)
72 if (!str)
63 if (!str)
73 return NULL;
64 return NULL;
74
65
66+/*
67+ * Haskell yaml package: added to support _WIN64
68+ */
69+#if _WIN64
75− return (yaml_char_t *) STRDUP((char *)str);
70+ return (yaml_char_t *)_strdup((char *)str);
71+#else
72+ return (yaml_char_t *)strdup((char *)str);
73+#endif
76}
74}
77
75
78/*
76/*
@@ -834,7 +832,7 @@ yaml_scalar_event_initialize(yaml_event_t *event,
834
832
835 assert(event); /* Non-NULL event object is expected. */
833 assert(event); /* Non-NULL event object is expected. */
836 /* following line added for Haskell yaml library */
834 /* following line added for Haskell yaml library */
837− if (!value && !length) value = "";
835+ if (!value && !length) value = (unsigned char*)"";
838 assert(value); /* Non-NULL anchor is expected. */
836 assert(value); /* Non-NULL anchor is expected. */
839
837
840 if (anchor) {
838 if (anchor) {
libyaml/emitter.c+8−13
@@ -517,7 +517,7 @@ yaml_emitter_emit_stream_start(yaml_emitter_t *emitter,
517 if (emitter->best_width < 0) {
517 if (emitter->best_width < 0) {
518 emitter->best_width = INT_MAX;
518 emitter->best_width = INT_MAX;
519 }
519 }
520−
520+
521 if (!emitter->line_break) {
521 if (!emitter->line_break) {
522 emitter->line_break = YAML_LN_BREAK;
522 emitter->line_break = YAML_LN_BREAK;
523 }
523 }
@@ -607,7 +607,7 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter,
607 if (!yaml_emitter_write_indent(emitter))
607 if (!yaml_emitter_write_indent(emitter))
608 return 0;
608 return 0;
609 }
609 }
610−
610+
611 if (event->data.document_start.tag_directives.start
611 if (event->data.document_start.tag_directives.start
612 != event->data.document_start.tag_directives.end) {
612 != event->data.document_start.tag_directives.end) {
613 implicit = 0;
613 implicit = 0;
@@ -721,7 +721,7 @@ yaml_emitter_emit_document_end(yaml_emitter_t *emitter,
721}
721}
722
722
723/*
723/*
724− *
724+ *
725 * Expect a flow item node.
725 * Expect a flow item node.
726 */
726 */
727
727
@@ -1402,7 +1402,7 @@ yaml_emitter_analyze_anchor(yaml_emitter_t *emitter,
1402{
1402{
1403 size_t anchor_length;
1403 size_t anchor_length;
1404 yaml_string_t string;
1404 yaml_string_t string;
1405−
1405+
1406 anchor_length = strlen((char *)anchor);
1406 anchor_length = strlen((char *)anchor);
1407 STRING_ASSIGN(string, anchor, anchor_length);
1407 STRING_ASSIGN(string, anchor, anchor_length);
1408
1408
@@ -1493,7 +1493,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
1493 int break_space = 0;
1493 int break_space = 0;
1494 int space_break = 0;
1494 int space_break = 0;
1495
1495
1496− int preceeded_by_whitespace = 0;
1496+ int preceded_by_whitespace = 0;
1497 int followed_by_whitespace = 0;
1497 int followed_by_whitespace = 0;
1498 int previous_space = 0;
1498 int previous_space = 0;
1499 int previous_break = 0;
1499 int previous_break = 0;
@@ -1524,7 +1524,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
1524 flow_indicators = 1;
1524 flow_indicators = 1;
1525 }
1525 }
1526
1526
1527− preceeded_by_whitespace = 1;
1527+ preceded_by_whitespace = 1;
1528 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
1528 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
1529
1529
1530 while (string.pointer != string.end)
1530 while (string.pointer != string.end)
@@ -1570,7 +1570,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
1570 }
1570 }
1571 }
1571 }
1572
1572
1573− if (CHECK(string, '#') && preceeded_by_whitespace) {
1573+ if (CHECK(string, '#') && preceded_by_whitespace) {
1574 flow_indicators = 1;
1574 flow_indicators = 1;
1575 block_indicators = 1;
1575 block_indicators = 1;
1576 }
1576 }
@@ -1619,7 +1619,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
1619 previous_break = 0;
1619 previous_break = 0;
1620 }
1620 }
1621
1621
1622− preceeded_by_whitespace = IS_BLANKZ(string);
1622+ preceded_by_whitespace = IS_BLANKZ(string);
1623 MOVE(string);
1623 MOVE(string);
1624 if (string.pointer != string.end) {
1624 if (string.pointer != string.end) {
1625 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
1625 followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
@@ -1946,10 +1946,6 @@ yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter,
1946
1946
1947 emitter->whitespace = 0;
1947 emitter->whitespace = 0;
1948 emitter->indention = 0;
1948 emitter->indention = 0;
1949− if (emitter->root_context)
1950− {
1951− emitter->open_ended = 1;
1952− }
1953
1949
1954 return 1;
1950 return 1;
1955}
1951}
@@ -2326,4 +2322,3 @@ yaml_emitter_write_folded_scalar(yaml_emitter_t *emitter,
2326
2322
2327 return 1;
2323 return 1;
2328}
2324}
2329−
libyaml/loader.c+2−2
@@ -239,8 +239,8 @@ yaml_parser_register_anchor(yaml_parser_t *parser,
239 if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
239 if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
240 yaml_free(anchor);
240 yaml_free(anchor);
241 return yaml_parser_set_composer_error_context(parser,
241 return yaml_parser_set_composer_error_context(parser,
242− "found duplicate anchor; first occurence",
242+ "found duplicate anchor; first occurrence",
243− alias_data->mark, "second occurence", data.mark);
243+ alias_data->mark, "second occurrence", data.mark);
244 }
244 }
245 }
245 }
246
246
libyaml/parser.c+1−1
@@ -1295,7 +1295,7 @@ yaml_parser_process_directives(yaml_parser_t *parser,
1295 token = PEEK_TOKEN(parser);
1295 token = PEEK_TOKEN(parser);
1296 if (!token) goto error;
1296 if (!token) goto error;
1297 }
1297 }
1298−
1298+
1299 for (default_tag_directive = default_tag_directives;
1299 for (default_tag_directive = default_tag_directives;
1300 default_tag_directive->handle; default_tag_directive++) {
1300 default_tag_directive->handle; default_tag_directive++) {
1301 if (!yaml_parser_append_tag_directive(parser, *default_tag_directive, 1,
1301 if (!yaml_parser_append_tag_directive(parser, *default_tag_directive, 1,
libyaml/reader.c+3−3
@@ -52,7 +52,7 @@ yaml_parser_determine_encoding(yaml_parser_t *parser)
52{
52{
53 /* Ensure that we had enough bytes in the raw buffer. */
53 /* Ensure that we had enough bytes in the raw buffer. */
54
54
55− while (!parser->eof
55+ while (!parser->eof
56 && parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
56 && parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
57 if (!yaml_parser_update_raw_buffer(parser)) {
57 if (!yaml_parser_update_raw_buffer(parser)) {
58 return 0;
58 return 0;
@@ -295,7 +295,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
295 parser->offset, value);
295 parser->offset, value);
296
296
297 break;
297 break;
298−
298+
299 case YAML_UTF16LE_ENCODING:
299 case YAML_UTF16LE_ENCODING:
300 case YAML_UTF16BE_ENCODING:
300 case YAML_UTF16BE_ENCODING:
301
301
@@ -318,7 +318,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
318 *
318 *
319 * The following formulas are used for decoding
319 * The following formulas are used for decoding
320 * and encoding characters using surrogate pairs:
320 * and encoding characters using surrogate pairs:
321− *
321+ *
322 * U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF)
322 * U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF)
323 * U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF)
323 * U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF)
324 * W1 = 110110yyyyyyyyyy
324 * W1 = 110110yyyyyyyyyy
libyaml/scanner.c+28−25
@@ -70,7 +70,7 @@
70 * %TAG !yaml! tag:yaml.org,2002:
70 * %TAG !yaml! tag:yaml.org,2002:
71 * ---
71 * ---
72 *
72 *
73− * The correspoding sequence of tokens:
73+ * The corresponding sequence of tokens:
74 *
74 *
75 * STREAM-START(utf-8)
75 * STREAM-START(utf-8)
76 * VERSION-DIRECTIVE(1,1)
76 * VERSION-DIRECTIVE(1,1)
@@ -762,7 +762,7 @@ yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token)
762 }
762 }
763
763
764 /* Fetch the next token from the queue. */
764 /* Fetch the next token from the queue. */
765−
765+
766 *token = DEQUEUE(parser, parser->tokens);
766 *token = DEQUEUE(parser, parser->tokens);
767 parser->token_available = 0;
767 parser->token_available = 0;
768 parser->tokens_parsed ++;
768 parser->tokens_parsed ++;
@@ -1114,7 +1114,7 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
1114 yaml_simple_key_t simple_key;
1114 yaml_simple_key_t simple_key;
1115 simple_key.possible = 1;
1115 simple_key.possible = 1;
1116 simple_key.required = required;
1116 simple_key.required = required;
1117− simple_key.token_number =
1117+ simple_key.token_number =
1118 parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);
1118 parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);
1119 simple_key.mark = parser->mark;
1119 simple_key.mark = parser->mark;
1120
1120
@@ -1200,7 +1200,7 @@ yaml_parser_decrease_flow_level(yaml_parser_t *parser)
1200 * Push the current indentation level to the stack and set the new level
1200 * Push the current indentation level to the stack and set the new level
1201 * the current column is greater than the indentation level. In this case,
1201 * the current column is greater than the indentation level. In this case,
1202 * append or insert the specified token into the token queue.
1202 * append or insert the specified token into the token queue.
1203− *
1203+ *
1204 */
1204 */
1205
1205
1206static int
1206static int
@@ -1251,7 +1251,7 @@ yaml_parser_roll_indent(yaml_parser_t *parser, ptrdiff_t column,
1251
1251
1252/*
1252/*
1253 * Pop indentation levels from the indents stack until the current level
1253 * Pop indentation levels from the indents stack until the current level
1254− * becomes less or equal to the column. For each intendation level, append
1254+ * becomes less or equal to the column. For each indentation level, append
1255 * the BLOCK-END token.
1255 * the BLOCK-END token.
1256 */
1256 */
1257
1257
@@ -1266,7 +1266,7 @@ yaml_parser_unroll_indent(yaml_parser_t *parser, ptrdiff_t column)
1266 if (parser->flow_level)
1266 if (parser->flow_level)
1267 return 1;
1267 return 1;
1268
1268
1269− /* Loop through the intendation levels in the stack. */
1269+ /* Loop through the indentation levels in the stack. */
1270
1270
1271 while (parser->indent > column)
1271 while (parser->indent > column)
1272 {
1272 {
@@ -1938,7 +1938,7 @@ yaml_parser_scan_to_next_token(yaml_parser_t *parser)
1938 *
1938 *
1939 * - in the flow context;
1939 * - in the flow context;
1940 * - in the block context, but not at the beginning of the line or
1940 * - in the block context, but not at the beginning of the line or
1941− * after '-', '?', or ':' (complex value).
1941+ * after '-', '?', or ':' (complex value).
1942 */
1942 */
1943
1943
1944 if (!CACHE(parser, 1)) return 0;
1944 if (!CACHE(parser, 1)) return 0;
@@ -2053,7 +2053,7 @@ yaml_parser_scan_directive(yaml_parser_t *parser, yaml_token_t *token)
2053 else
2053 else
2054 {
2054 {
2055 yaml_parser_set_scanner_error(parser, "while scanning a directive",
2055 yaml_parser_set_scanner_error(parser, "while scanning a directive",
2056− start_mark, "found uknown directive name");
2056+ start_mark, "found unknown directive name");
2057 goto error;
2057 goto error;
2058 }
2058 }
2059
2059
@@ -2775,15 +2775,15 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
2775
2775
2776 if (IS_DIGIT(parser->buffer))
2776 if (IS_DIGIT(parser->buffer))
2777 {
2777 {
2778− /* Check that the intendation is greater than 0. */
2778+ /* Check that the indentation is greater than 0. */
2779
2779
2780 if (CHECK(parser->buffer, '0')) {
2780 if (CHECK(parser->buffer, '0')) {
2781 yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2781 yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2782− start_mark, "found an intendation indicator equal to 0");
2782+ start_mark, "found an indentation indicator equal to 0");
2783 goto error;
2783 goto error;
2784 }
2784 }
2785
2785
2786− /* Get the intendation level and eat the indicator. */
2786+ /* Get the indentation level and eat the indicator. */
2787
2787
2788 increment = AS_DIGIT(parser->buffer);
2788 increment = AS_DIGIT(parser->buffer);
2789
2789
@@ -2797,7 +2797,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
2797 {
2797 {
2798 if (CHECK(parser->buffer, '0')) {
2798 if (CHECK(parser->buffer, '0')) {
2799 yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2799 yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2800− start_mark, "found an intendation indicator equal to 0");
2800+ start_mark, "found an indentation indicator equal to 0");
2801 goto error;
2801 goto error;
2802 }
2802 }
2803
2803
@@ -2847,7 +2847,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
2847
2847
2848 end_mark = parser->mark;
2848 end_mark = parser->mark;
2849
2849
2850− /* Set the intendation level if it was specified. */
2850+ /* Set the indentation level if it was specified. */
2851
2851
2852 if (increment) {
2852 if (increment) {
2853 indent = parser->indent >= 0 ? parser->indent+increment : increment;
2853 indent = parser->indent >= 0 ? parser->indent+increment : increment;
@@ -2913,7 +2913,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
2913
2913
2914 if (!READ_LINE(parser, leading_break)) goto error;
2914 if (!READ_LINE(parser, leading_break)) goto error;
2915
2915
2916− /* Eat the following intendation spaces and line breaks. */
2916+ /* Eat the following indentation spaces and line breaks. */
2917
2917
2918 if (!yaml_parser_scan_block_scalar_breaks(parser,
2918 if (!yaml_parser_scan_block_scalar_breaks(parser,
2919 &indent, &trailing_breaks, start_mark, &end_mark)) goto error;
2919 &indent, &trailing_breaks, start_mark, &end_mark)) goto error;
@@ -2948,8 +2948,8 @@ error:
2948}
2948}
2949
2949
2950/*
2950/*
2951− * Scan intendation spaces and line breaks for a block scalar. Determine the
2951+ * Scan indentation spaces and line breaks for a block scalar. Determine the
2952− * intendation level if needed.
2952+ * indentation level if needed.
2953 */
2953 */
2954
2954
2955static int
2955static int
@@ -2961,11 +2961,11 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
2961
2961
2962 *end_mark = parser->mark;
2962 *end_mark = parser->mark;
2963
2963
2964− /* Eat the intendation spaces and line breaks. */
2964+ /* Eat the indentation spaces and line breaks. */
2965
2965
2966 while (1)
2966 while (1)
2967 {
2967 {
2968− /* Eat the intendation spaces. */
2968+ /* Eat the indentation spaces. */
2969
2969
2970 if (!CACHE(parser, 1)) return 0;
2970 if (!CACHE(parser, 1)) return 0;
2971
2971
@@ -2978,12 +2978,12 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
2978 if ((int)parser->mark.column > max_indent)
2978 if ((int)parser->mark.column > max_indent)
2979 max_indent = (int)parser->mark.column;
2979 max_indent = (int)parser->mark.column;
2980
2980
2981− /* Check for a tab character messing the intendation. */
2981+ /* Check for a tab character messing the indentation. */
2982
2982
2983 if ((!*indent || (int)parser->mark.column < *indent)
2983 if ((!*indent || (int)parser->mark.column < *indent)
2984 && IS_TAB(parser->buffer)) {
2984 && IS_TAB(parser->buffer)) {
2985 return yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2985 return yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
2986− start_mark, "found a tab character where an intendation space is expected");
2986+ start_mark, "found a tab character where an indentation space is expected");
2987 }
2987 }
2988
2988
2989 /* Have we found a non-empty line? */
2989 /* Have we found a non-empty line? */
@@ -3007,7 +3007,7 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
3007 *indent = 1;
3007 *indent = 1;
3008 }
3008 }
3009
3009
3010− return 1;
3010+ return 1;
3011}
3011}
3012
3012
3013/*
3013/*
@@ -3162,6 +3162,10 @@ yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
3162 *(string.pointer++) = '"';
3162 *(string.pointer++) = '"';
3163 break;
3163 break;
3164
3164
3165+ case '/':
3166+ *(string.pointer++) = '/';
3167+ break;
3168+
3165 case '\'':
3169 case '\'':
3166 *(string.pointer++) = '\'';
3170 *(string.pointer++) = '\'';
3167 break;
3171 break;
@@ -3504,12 +3508,12 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
3504 {
3508 {
3505 if (IS_BLANK(parser->buffer))
3509 if (IS_BLANK(parser->buffer))
3506 {
3510 {
3507− /* Check for tab character that abuse intendation. */
3511+ /* Check for tab character that abuse indentation. */
3508
3512
3509 if (leading_blanks && (int)parser->mark.column < indent
3513 if (leading_blanks && (int)parser->mark.column < indent
3510 && IS_TAB(parser->buffer)) {
3514 && IS_TAB(parser->buffer)) {
3511 yaml_parser_set_scanner_error(parser, "while scanning a plain scalar",
3515 yaml_parser_set_scanner_error(parser, "while scanning a plain scalar",
3512− start_mark, "found a tab character that violate intendation");
3516+ start_mark, "found a tab character that violate indentation");
3513 goto error;
3517 goto error;
3514 }
3518 }
3515
3519
@@ -3542,7 +3546,7 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
3542 if (!CACHE(parser, 1)) goto error;
3546 if (!CACHE(parser, 1)) goto error;
3543 }
3547 }
3544
3548
3545− /* Check intendation level. */
3549+ /* Check indentation level. */
3546
3550
3547 if (!parser->flow_level && (int)parser->mark.column < indent)
3551 if (!parser->flow_level && (int)parser->mark.column < indent)
3548 break;
3552 break;
@@ -3573,4 +3577,3 @@ error:
3573
3577
3574 return 0;
3578 return 0;
3575}
3579}
3576−
libyaml/writer.c+1−1
@@ -74,7 +74,7 @@ yaml_emitter_flush(yaml_emitter_t *emitter)
74 unsigned int value;
74 unsigned int value;
75 size_t k;
75 size_t k;
76
76
77− /*
77+ /*
78 * See the "reader.c" code for more details on UTF-8 encoding. Note
78 * See the "reader.c" code for more details on UTF-8 encoding. Note
79 * that we assume that the buffer contains a valid UTF-8 sequence.
79 * that we assume that the buffer contains a valid UTF-8 sequence.
80 */
80 */
libyaml/yaml.h+2−4
@@ -26,9 +26,7 @@ extern "C" {
26
26
27/** The public API declaration. */
27/** The public API declaration. */
28
28
29−#if defined(__MINGW32__)
30−# define YAML_DECLARE(type) type
31−#elif defined(_WIN32)
29+#ifdef _WIN32
32# if defined(YAML_DECLARE_STATIC)
30# if defined(YAML_DECLARE_STATIC)
33# define YAML_DECLARE(type) type
31# define YAML_DECLARE(type) type
34# elif defined(YAML_DECLARE_EXPORT)
32# elif defined(YAML_DECLARE_EXPORT)
@@ -665,7 +663,7 @@ yaml_event_delete(yaml_event_t *event);
665
663
666/** The tag @c !!null with the only possible value: @c null. */
664/** The tag @c !!null with the only possible value: @c null. */
667#define YAML_NULL_TAG "tag:yaml.org,2002:null"
665#define YAML_NULL_TAG "tag:yaml.org,2002:null"
668−/** The tag @c !!bool with the values: @c true and @c falce. */
666+/** The tag @c !!bool with the values: @c true and @c false. */
669#define YAML_BOOL_TAG "tag:yaml.org,2002:bool"
667#define YAML_BOOL_TAG "tag:yaml.org,2002:bool"
670/** The tag @c !!str for string values. */
668/** The tag @c !!str for string values. */
671#define YAML_STR_TAG "tag:yaml.org,2002:str"
669#define YAML_STR_TAG "tag:yaml.org,2002:str"
libyaml/yaml_private.h+3−3
@@ -1,4 +1,3 @@
1−
2#if HAVE_CONFIG_H
1#if HAVE_CONFIG_H
3#include <config.h>
2#include <config.h>
4#endif
3#endif
@@ -242,9 +241,9 @@ yaml_string_join(
242 (string).pointer[offset] <= (yaml_char_t) 'f') ? \
241 (string).pointer[offset] <= (yaml_char_t) 'f') ? \
243 ((string).pointer[offset] - (yaml_char_t) 'a' + 10) : \
242 ((string).pointer[offset] - (yaml_char_t) 'a' + 10) : \
244 ((string).pointer[offset] - (yaml_char_t) '0'))
243 ((string).pointer[offset] - (yaml_char_t) '0'))
245−
244+
246#define AS_HEX(string) AS_HEX_AT((string),0)
245#define AS_HEX(string) AS_HEX_AT((string),0)
247−
246+
248/*
247/*
249 * Check if the character is ASCII.
248 * Check if the character is ASCII.
250 */
249 */
@@ -658,6 +657,7 @@ yaml_queue_extend(void **start, void **head, void **tail, void **end);
658 (node).data.mapping.pairs.top = (node_pairs_start), \
657 (node).data.mapping.pairs.top = (node_pairs_start), \
659 (node).data.mapping.style = (node_style))
658 (node).data.mapping.style = (node_style))
660
659
660+/* For Haskell yaml package, since we do not use the configure script */
661#define YAML_VERSION_STRING "0.1.7"
661#define YAML_VERSION_STRING "0.1.7"
662#define YAML_VERSION_MAJOR 0
662#define YAML_VERSION_MAJOR 0
663#define YAML_VERSION_MINOR 1
663#define YAML_VERSION_MINOR 1
test/Data/YamlSpec.hs+1−1
@@ -450,7 +450,7 @@ caseQuotedNumber, caseUnquotedNumber, caseAttribNumber, caseIntegerDecimals :: A
450caseQuotedNumber = D.decode "foo: \"1234\"" @?= Just (object [("foo", D.String "1234")])
450caseQuotedNumber = D.decode "foo: \"1234\"" @?= Just (object [("foo", D.String "1234")])
451caseUnquotedNumber = D.decode "foo: 1234" @?= Just (object [("foo", D.Number 1234)])
451caseUnquotedNumber = D.decode "foo: 1234" @?= Just (object [("foo", D.Number 1234)])
452caseAttribNumber = D.decode "foo: !!str 1234" @?= Just (object [("foo", D.String "1234")])
452caseAttribNumber = D.decode "foo: !!str 1234" @?= Just (object [("foo", D.String "1234")])
453−caseIntegerDecimals = D.encode (1 :: Int) @?= "1\n...\n"
453+caseIntegerDecimals = D.encode (1 :: Int) @?= "1\n"
454
454
455obj :: Maybe D.Value
455obj :: Maybe D.Value
456obj = Just (object [("foo", D.Bool False), ("bar", D.Bool True), ("baz", D.Bool True)])
456obj = Just (object [("foo", D.Bool False), ("bar", D.Bool True), ("baz", D.Bool True)])
vendor/libyamlnew file+1

Submodule changed.