Changeset 315 for libyaml/branches/stable/src/emitter.c
- Timestamp:
- 12/27/08 14:14:00 (4 years ago)
- File:
-
- 1 edited
-
libyaml/branches/stable/src/emitter.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/branches/stable/src/emitter.c
r309 r315 586 586 if (!first || emitter->canonical) { 587 587 implicit = 0; 588 } 589 590 if ((event->data.document_start.version_directive || 591 (event->data.document_start.tag_directives.start 592 != event->data.document_start.tag_directives.end)) && 593 emitter->open_ended) 594 { 595 if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) 596 return 0; 597 if (!yaml_emitter_write_indent(emitter)) 598 return 0; 588 599 } 589 600 … … 639 650 else if (event->type == YAML_STREAM_END_EVENT) 640 651 { 652 if (emitter->open_ended) 653 { 654 if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) 655 return 0; 656 if (!yaml_emitter_write_indent(emitter)) 657 return 0; 658 } 659 641 660 if (!yaml_emitter_flush(emitter)) 642 661 return 0; … … 1766 1785 emitter->whitespace = is_whitespace; 1767 1786 emitter->indention = (emitter->indention && is_indention); 1787 emitter->open_ended = 0; 1768 1788 1769 1789 return 1; … … 1903 1923 emitter->whitespace = 0; 1904 1924 emitter->indention = 0; 1925 if (emitter->root_context) 1926 { 1927 emitter->open_ended = 1; 1928 } 1905 1929 1906 1930 return 1; … … 2137 2161 } 2138 2162 2163 emitter->open_ended = 0; 2164 2139 2165 string.pointer = string.end; 2140 2166 if (string.start == string.pointer) … … 2154 2180 { 2155 2181 chomp_hint = "+"; 2182 emitter->open_ended = 1; 2156 2183 } 2157 2184 else … … 2163 2190 { 2164 2191 chomp_hint = "+"; 2192 emitter->open_ended = 1; 2165 2193 } 2166 2194 } … … 2238 2266 k += WIDTH_AT(string, k); 2239 2267 } 2240 if (!IS_BLANK _AT(string, k)) {2268 if (!IS_BLANKZ_AT(string, k)) { 2241 2269 if (!PUT_BREAK(emitter)) return 0; 2242 2270 }
Note: See TracChangeset
for help on using the changeset viewer.
