# HG changeset patch # User Tina Müller <cpan2@tinita.de> # Date 1587295183 -7200 # Sun Apr 19 13:19:43 2020 +0200 # Node ID 5398a51e943a38d869975fc37990b8056a20733d # Parent a7a477773886ab82aa32f523f33d45a2c0272529 0.2.4 dist files diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set (YAML_VERSION_MAJOR 0) set (YAML_VERSION_MINOR 2) -set (YAML_VERSION_PATCH 3) +set (YAML_VERSION_PATCH 4) set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}") option(BUILD_SHARED_LIBS "Build libyaml as a shared library" OFF) diff --git a/Changes b/Changes --- a/Changes +++ b/Changes @@ -1,3 +1,12 @@ +0.2.4 2020-04-19 + + - https://github.com/yaml/libyaml/pull/143 + Add packaging/docker-dist to Makefile.am + + - https://github.com/yaml/libyaml/pull/174 + Fix logic for document end before directive + + 0.2.3 2020-04-11 - https://github.com/yaml/libyaml/pull/130 diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,7 @@ -find ${builddir} -name Makefile.in -exec rm -f '{}' ';' distclean-local: - rm -fr tests/run-test-suite + rm -fr tests/run-test-suite packaging -git worktree prune .PHONY: bootstrap @@ -34,3 +34,13 @@ -git branch --track run-test-suite origin/run-test-suite -git worktree prune git worktree add $@ run-test-suite + +packaging: + -git branch --track $@ origin/$@ + git worktree add --force $@ $@ + +docker-dist: packaging + make -C $</docker libyaml-dist + +docker-test-pyyaml: packaging + make -C $</docker test-pyyaml diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -860,7 +860,7 @@ -find ${builddir} -name Makefile.in -exec rm -f '{}' ';' distclean-local: - rm -fr tests/run-test-suite + rm -fr tests/run-test-suite packaging -git worktree prune .PHONY: bootstrap @@ -882,6 +882,16 @@ -git worktree prune git worktree add $@ run-test-suite +packaging: + -git branch --track $@ origin/$@ + git worktree add --force $@ $@ + +docker-dist: packaging + make -C $</docker libyaml-dist + +docker-test-pyyaml: packaging + make -C $</docker test-pyyaml + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/configure b/configure --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yaml 0.2.3. +# Generated by GNU Autoconf 2.69 for yaml 0.2.4. # # Report bugs to <https://github.com/yaml/libyaml/issues/new>. # @@ -589,8 +589,8 @@ # Identity of this package. PACKAGE_NAME='yaml' PACKAGE_TARNAME='yaml' -PACKAGE_VERSION='0.2.3' -PACKAGE_STRING='yaml 0.2.3' +PACKAGE_VERSION='0.2.4' +PACKAGE_STRING='yaml 0.2.4' PACKAGE_BUGREPORT='https://github.com/yaml/libyaml/issues/new' PACKAGE_URL='' @@ -1329,7 +1329,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yaml 0.2.3 to adapt to many kinds of systems. +\`configure' configures yaml 0.2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1400,7 +1400,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yaml 0.2.3:";; + short | recursive ) echo "Configuration of yaml 0.2.4:";; esac cat <<\_ACEOF @@ -1510,7 +1510,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yaml configure 0.2.3 +yaml configure 0.2.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1933,7 +1933,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yaml $as_me 0.2.3, which was +It was created by yaml $as_me 0.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2798,7 +2798,7 @@ # Define the identity of the package. PACKAGE='yaml' - VERSION='0.2.3' + VERSION='0.2.4' cat >>confdefs.h <<_ACEOF @@ -2900,16 +2900,16 @@ $as_echo "#define YAML_VERSION_MINOR 2" >>confdefs.h -$as_echo "#define YAML_VERSION_PATCH 3" >>confdefs.h - - -$as_echo "#define YAML_VERSION_STRING \"0.2.3\"" >>confdefs.h +$as_echo "#define YAML_VERSION_PATCH 4" >>confdefs.h + + +$as_echo "#define YAML_VERSION_STRING \"0.2.4\"" >>confdefs.h # Define substitutions for the libtool version numbers. YAML_LT_RELEASE=0 YAML_LT_CURRENT=2 -YAML_LT_REVISION=7 +YAML_LT_REVISION=8 YAML_LT_AGE=0 @@ -12878,7 +12878,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yaml $as_me 0.2.3, which was +This file was extended by yaml $as_me 0.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12944,7 +12944,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yaml config.status 0.2.3 +yaml config.status 0.2.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # Define the package version numbers and the bug reporting link. m4_define([YAML_MAJOR], 0) m4_define([YAML_MINOR], 2) -m4_define([YAML_PATCH], 3) +m4_define([YAML_PATCH], 4) m4_define([YAML_BUGS], [https://github.com/yaml/libyaml/issues/new]) # Define the libtool version numbers; check the Autobook, Section 11.4. @@ -19,7 +19,7 @@ # YAML_AGE = 0 m4_define([YAML_RELEASE], 0) m4_define([YAML_CURRENT], 2) -m4_define([YAML_REVISION], 7) +m4_define([YAML_REVISION], 8) m4_define([YAML_AGE], 0) # Initialize autoconf & automake. diff --git a/doc/html/annotated.html b/doc/html/annotated.html --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/classes.html b/doc/html/classes.html --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/files.html b/doc/html/files.html --- a/doc/html/files.html +++ b/doc/html/files.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions.html b/doc/html/functions.html --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_b.html b/doc/html/functions_b.html --- a/doc/html/functions_b.html +++ b/doc/html/functions_b.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_c.html b/doc/html/functions_c.html --- a/doc/html/functions_c.html +++ b/doc/html/functions_c.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_d.html b/doc/html/functions_d.html --- a/doc/html/functions_d.html +++ b/doc/html/functions_d.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_e.html b/doc/html/functions_e.html --- a/doc/html/functions_e.html +++ b/doc/html/functions_e.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_f.html b/doc/html/functions_f.html --- a/doc/html/functions_f.html +++ b/doc/html/functions_f.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_h.html b/doc/html/functions_h.html --- a/doc/html/functions_h.html +++ b/doc/html/functions_h.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_i.html b/doc/html/functions_i.html --- a/doc/html/functions_i.html +++ b/doc/html/functions_i.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_k.html b/doc/html/functions_k.html --- a/doc/html/functions_k.html +++ b/doc/html/functions_k.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_l.html b/doc/html/functions_l.html --- a/doc/html/functions_l.html +++ b/doc/html/functions_l.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_m.html b/doc/html/functions_m.html --- a/doc/html/functions_m.html +++ b/doc/html/functions_m.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_n.html b/doc/html/functions_n.html --- a/doc/html/functions_n.html +++ b/doc/html/functions_n.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_o.html b/doc/html/functions_o.html --- a/doc/html/functions_o.html +++ b/doc/html/functions_o.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_p.html b/doc/html/functions_p.html --- a/doc/html/functions_p.html +++ b/doc/html/functions_p.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_q.html b/doc/html/functions_q.html --- a/doc/html/functions_q.html +++ b/doc/html/functions_q.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_r.html b/doc/html/functions_r.html --- a/doc/html/functions_r.html +++ b/doc/html/functions_r.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_s.html b/doc/html/functions_s.html --- a/doc/html/functions_s.html +++ b/doc/html/functions_s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_t.html b/doc/html/functions_t.html --- a/doc/html/functions_t.html +++ b/doc/html/functions_t.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_u.html b/doc/html/functions_u.html --- a/doc/html/functions_u.html +++ b/doc/html/functions_u.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_v.html b/doc/html/functions_v.html --- a/doc/html/functions_v.html +++ b/doc/html/functions_v.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_b.html b/doc/html/functions_vars_b.html --- a/doc/html/functions_vars_b.html +++ b/doc/html/functions_vars_b.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_c.html b/doc/html/functions_vars_c.html --- a/doc/html/functions_vars_c.html +++ b/doc/html/functions_vars_c.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_d.html b/doc/html/functions_vars_d.html --- a/doc/html/functions_vars_d.html +++ b/doc/html/functions_vars_d.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_e.html b/doc/html/functions_vars_e.html --- a/doc/html/functions_vars_e.html +++ b/doc/html/functions_vars_e.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_f.html b/doc/html/functions_vars_f.html --- a/doc/html/functions_vars_f.html +++ b/doc/html/functions_vars_f.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_h.html b/doc/html/functions_vars_h.html --- a/doc/html/functions_vars_h.html +++ b/doc/html/functions_vars_h.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_i.html b/doc/html/functions_vars_i.html --- a/doc/html/functions_vars_i.html +++ b/doc/html/functions_vars_i.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_k.html b/doc/html/functions_vars_k.html --- a/doc/html/functions_vars_k.html +++ b/doc/html/functions_vars_k.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_l.html b/doc/html/functions_vars_l.html --- a/doc/html/functions_vars_l.html +++ b/doc/html/functions_vars_l.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_m.html b/doc/html/functions_vars_m.html --- a/doc/html/functions_vars_m.html +++ b/doc/html/functions_vars_m.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_n.html b/doc/html/functions_vars_n.html --- a/doc/html/functions_vars_n.html +++ b/doc/html/functions_vars_n.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_o.html b/doc/html/functions_vars_o.html --- a/doc/html/functions_vars_o.html +++ b/doc/html/functions_vars_o.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_p.html b/doc/html/functions_vars_p.html --- a/doc/html/functions_vars_p.html +++ b/doc/html/functions_vars_p.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_q.html b/doc/html/functions_vars_q.html --- a/doc/html/functions_vars_q.html +++ b/doc/html/functions_vars_q.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_r.html b/doc/html/functions_vars_r.html --- a/doc/html/functions_vars_r.html +++ b/doc/html/functions_vars_r.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_s.html b/doc/html/functions_vars_s.html --- a/doc/html/functions_vars_s.html +++ b/doc/html/functions_vars_s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_t.html b/doc/html/functions_vars_t.html --- a/doc/html/functions_vars_t.html +++ b/doc/html/functions_vars_t.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_u.html b/doc/html/functions_vars_u.html --- a/doc/html/functions_vars_u.html +++ b/doc/html/functions_vars_u.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_v.html b/doc/html/functions_vars_v.html --- a/doc/html/functions_vars_v.html +++ b/doc/html/functions_vars_v.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_vars_w.html b/doc/html/functions_vars_w.html --- a/doc/html/functions_vars_w.html +++ b/doc/html/functions_vars_w.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/functions_w.html b/doc/html/functions_w.html --- a/doc/html/functions_w.html +++ b/doc/html/functions_w.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals.html b/doc/html/globals.html --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html --- a/doc/html/globals_enum.html +++ b/doc/html/globals_enum.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html --- a/doc/html/globals_eval.html +++ b/doc/html/globals_eval.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__basic.html b/doc/html/group__basic.html --- a/doc/html/group__basic.html +++ b/doc/html/group__basic.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__emitter.html b/doc/html/group__emitter.html --- a/doc/html/group__emitter.html +++ b/doc/html/group__emitter.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__events.html b/doc/html/group__events.html --- a/doc/html/group__events.html +++ b/doc/html/group__events.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__export.html b/doc/html/group__export.html --- a/doc/html/group__export.html +++ b/doc/html/group__export.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__nodes.html b/doc/html/group__nodes.html --- a/doc/html/group__nodes.html +++ b/doc/html/group__nodes.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__parser.html b/doc/html/group__parser.html --- a/doc/html/group__parser.html +++ b/doc/html/group__parser.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__styles.html b/doc/html/group__styles.html --- a/doc/html/group__styles.html +++ b/doc/html/group__styles.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__tokens.html b/doc/html/group__tokens.html --- a/doc/html/group__tokens.html +++ b/doc/html/group__tokens.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/group__version.html b/doc/html/group__version.html --- a/doc/html/group__version.html +++ b/doc/html/group__version.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/index.html b/doc/html/index.html --- a/doc/html/index.html +++ b/doc/html/index.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/modules.html b/doc/html/modules.html --- a/doc/html/modules.html +++ b/doc/html/modules.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__alias__data__s.html b/doc/html/structyaml__alias__data__s.html --- a/doc/html/structyaml__alias__data__s.html +++ b/doc/html/structyaml__alias__data__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__anchors__s.html b/doc/html/structyaml__anchors__s.html --- a/doc/html/structyaml__anchors__s.html +++ b/doc/html/structyaml__anchors__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__document__s.html b/doc/html/structyaml__document__s.html --- a/doc/html/structyaml__document__s.html +++ b/doc/html/structyaml__document__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__emitter__s.html b/doc/html/structyaml__emitter__s.html --- a/doc/html/structyaml__emitter__s.html +++ b/doc/html/structyaml__emitter__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__event__s.html b/doc/html/structyaml__event__s.html --- a/doc/html/structyaml__event__s.html +++ b/doc/html/structyaml__event__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__mark__s.html b/doc/html/structyaml__mark__s.html --- a/doc/html/structyaml__mark__s.html +++ b/doc/html/structyaml__mark__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__node__pair__s.html b/doc/html/structyaml__node__pair__s.html --- a/doc/html/structyaml__node__pair__s.html +++ b/doc/html/structyaml__node__pair__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__node__s.html b/doc/html/structyaml__node__s.html --- a/doc/html/structyaml__node__s.html +++ b/doc/html/structyaml__node__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__parser__s.html b/doc/html/structyaml__parser__s.html --- a/doc/html/structyaml__parser__s.html +++ b/doc/html/structyaml__parser__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__simple__key__s.html b/doc/html/structyaml__simple__key__s.html --- a/doc/html/structyaml__simple__key__s.html +++ b/doc/html/structyaml__simple__key__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__tag__directive__s.html b/doc/html/structyaml__tag__directive__s.html --- a/doc/html/structyaml__tag__directive__s.html +++ b/doc/html/structyaml__tag__directive__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__token__s.html b/doc/html/structyaml__token__s.html --- a/doc/html/structyaml__token__s.html +++ b/doc/html/structyaml__token__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/structyaml__version__directive__s.html b/doc/html/structyaml__version__directive__s.html --- a/doc/html/structyaml__version__directive__s.html +++ b/doc/html/structyaml__version__directive__s.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/doc/html/yaml_8h.html b/doc/html/yaml_8h.html --- a/doc/html/yaml_8h.html +++ b/doc/html/yaml_8h.html @@ -19,7 +19,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">yaml -  <span id="projectnumber">0.2.3</span> +  <span id="projectnumber">0.2.4</span> </div> </td> </tr> diff --git a/src/emitter.c b/src/emitter.c --- a/src/emitter.c +++ b/src/emitter.c @@ -495,6 +495,7 @@ yaml_emitter_emit_stream_start(yaml_emitter_t *emitter, yaml_event_t *event) { + emitter->open_ended = 0; if (event->type == YAML_STREAM_START_EVENT) { if (!emitter->encoding) { @@ -594,17 +595,23 @@ { if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) return 0; - emitter->open_ended = 0; if (!yaml_emitter_write_indent(emitter)) return 0; } + emitter->open_ended = 0; if (event->data.document_start.version_directive) { implicit = 0; if (!yaml_emitter_write_indicator(emitter, "%YAML", 1, 0, 0)) return 0; - if (!yaml_emitter_write_indicator(emitter, "1.1", 1, 0, 0)) - return 0; + if (event->data.document_start.version_directive->minor == 1) { + if (!yaml_emitter_write_indicator(emitter, "1.1", 1, 0, 0)) + return 0; + } + else { + if (!yaml_emitter_write_indicator(emitter, "1.2", 1, 0, 0)) + return 0; + } if (!yaml_emitter_write_indent(emitter)) return 0; } @@ -656,7 +663,7 @@ * This can happen if a block scalar with trailing empty lines * is at the end of the stream */ - if (emitter->open_ended) + if (emitter->open_ended == 2) { if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) return 0; @@ -709,6 +716,8 @@ if (!yaml_emitter_write_indent(emitter)) return 0; } + else if (!emitter->open_ended) + emitter->open_ended = 1; if (!yaml_emitter_flush(emitter)) return 0; @@ -2216,7 +2225,7 @@ else if (string.start == string.pointer) { chomp_hint = "+"; - emitter->open_ended = 1; + emitter->open_ended = 2; } else { @@ -2226,7 +2235,7 @@ if (IS_BREAK(string)) { chomp_hint = "+"; - emitter->open_ended = 1; + emitter->open_ended = 2; } } } diff --git a/tests/run-emitter-test-suite.c b/tests/run-emitter-test-suite.c --- a/tests/run-emitter-test-suite.c +++ b/tests/run-emitter-test-suite.c @@ -3,30 +3,58 @@ #include <stdlib.h> #include <stdio.h> #include <assert.h> +#include "../src/yaml_private.h" int get_line(FILE * input, char *line); char *get_anchor(char sigil, char *line, char *anchor); char *get_tag(char *line, char *tag); void get_value(char *line, char *value, int *style); +int usage(int ret); int main(int argc, char *argv[]) { FILE *input; yaml_emitter_t emitter; yaml_event_t event; + yaml_version_directive_t *version_directive = NULL; int canonical = 0; int unicode = 0; char line[1024]; + int foundfile = 0; + int i = 0; + int minor = 0; - if (argc == 1) + for (i = 1; i < argc; i++) { + if (strncmp(argv[i], "--help", 6) == 0) + return usage(0); + if (strncmp(argv[i], "-h", 2) == 0) + return usage(0); + if (strncmp(argv[i], "--directive", 11) == 0) { + if (i+1 == argc) + return usage(1); + i++; + if (strncmp(argv[i], "1.1", 3) == 0) + minor = 1; + else if (strncmp(argv[i], "1.2", 3) == 0) + minor = 2; + else + return usage(1); + } + else if (!foundfile) { + input = fopen(argv[i], "rb"); + foundfile = 1; + } + + } + if (minor) { + version_directive = YAML_MALLOC_STATIC(yaml_version_directive_t); + version_directive->major = 1; + version_directive->minor = minor; + } + if (!foundfile) input = stdin; - else if (argc == 2) - input = fopen(argv[1], "rb"); - else { - fprintf(stderr, "Usage: libyaml-emitter [<input-file>]\n"); - return 1; - } + assert(input); if (!yaml_emitter_initialize(&emitter)) { @@ -37,6 +65,7 @@ yaml_emitter_set_canonical(&emitter, canonical); yaml_emitter_set_unicode(&emitter, unicode); + while (get_line(input, line)) { int ok; char anchor[256]; @@ -51,7 +80,7 @@ } else if (strncmp(line, "+DOC", 4) == 0) { implicit = strncmp(line, "+DOC ---", 8) != 0; - ok = yaml_document_start_event_initialize(&event, NULL, NULL, NULL, implicit); + ok = yaml_document_start_event_initialize(&event, version_directive, NULL, NULL, implicit); } else if (strncmp(line, "-DOC", 4) == 0) { implicit = strncmp(line, "-DOC ...", 8) != 0; @@ -229,3 +258,8 @@ } value[i] = '\0'; } + +int usage(int ret) { + fprintf(stderr, "Usage: run-emitter-test-suite [--directive (1.1|1.2)] [<input-file>]\n"); + return ret; +}