Skip to content
Snippets Groups Projects
Commit 9647b9096b35 authored by Ingy döt Net's avatar Ingy döt Net
Browse files

Break long lines in a prefered way by hand

Then see if we can get indent to keep them this way...
parent aab29dd5aa19
Branches
No related tags found
No related merge requests found
......@@ -45,6 +45,9 @@
int implicit;
if (strncmp(line, "+STR", 4) == 0) {
ok = yaml_stream_start_event_initialize(&event, YAML_UTF8_ENCODING);
ok = yaml_stream_start_event_initialize(
&event,
YAML_UTF8_ENCODING
);
}
else if (strncmp(line, "-STR", 4) == 0) {
......@@ -49,6 +52,8 @@
}
else if (strncmp(line, "-STR", 4) == 0) {
ok = yaml_stream_end_event_initialize(&event);
ok = yaml_stream_end_event_initialize(
&event
);
}
else if (strncmp(line, "+DOC", 4) == 0) {
implicit = strncmp(line, "+DOC ---", 8) != 0;
......@@ -52,7 +57,13 @@
}
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,
NULL,
NULL,
NULL,
implicit
);
}
else if (strncmp(line, "-DOC", 4) == 0) {
implicit = strncmp(line, "-DOC ...", 8) != 0;
......@@ -56,6 +67,9 @@
}
else if (strncmp(line, "-DOC", 4) == 0) {
implicit = strncmp(line, "-DOC ...", 8) != 0;
ok = yaml_document_end_event_initialize(&event, implicit);
ok = yaml_document_end_event_initialize(
&event,
implicit
);
}
else if (strncmp(line, "+MAP", 4) == 0) {
......@@ -60,7 +74,11 @@
}
else if (strncmp(line, "+MAP", 4) == 0) {
ok = yaml_mapping_start_event_initialize(&event, (yaml_char_t *)
get_anchor('&', line, anchor), (yaml_char_t *)
get_tag(line, tag), 0, YAML_BLOCK_MAPPING_STYLE);
ok = yaml_mapping_start_event_initialize(
&event,
(yaml_char_t *) get_anchor('&', line, anchor),
(yaml_char_t *) get_tag(line, tag),
0,
YAML_BLOCK_MAPPING_STYLE
);
}
else if (strncmp(line, "-MAP", 4) == 0) {
......@@ -65,5 +83,7 @@
}
else if (strncmp(line, "-MAP", 4) == 0) {
ok = yaml_mapping_end_event_initialize(&event);
ok = yaml_mapping_end_event_initialize(
&event
);
}
else if (strncmp(line, "+SEQ", 4) == 0) {
......@@ -68,7 +88,11 @@
}
else if (strncmp(line, "+SEQ", 4) == 0) {
ok = yaml_sequence_start_event_initialize(&event, (yaml_char_t *)
get_anchor('&', line, anchor), (yaml_char_t *)
get_tag(line, tag), 0, YAML_BLOCK_SEQUENCE_STYLE);
ok = yaml_sequence_start_event_initialize(
&event,
(yaml_char_t *) get_anchor('&', line, anchor),
(yaml_char_t *) get_tag(line, tag),
0,
YAML_BLOCK_SEQUENCE_STYLE
);
}
else if (strncmp(line, "-SEQ", 4) == 0) {
......@@ -73,6 +97,8 @@
}
else if (strncmp(line, "-SEQ", 4) == 0) {
ok = yaml_sequence_end_event_initialize(&event);
ok = yaml_sequence_end_event_initialize(
&event
);
}
else if (strncmp(line, "=VAL", 4) == 0) {
char value[1024];
......@@ -81,7 +107,15 @@
get_value(line, value, &style);
implicit = (get_tag(line, tag) == NULL);
ok = yaml_scalar_event_initialize(&event, (yaml_char_t *)
get_anchor('&', line, anchor), (yaml_char_t *) get_tag(line, tag), (yaml_char_t *) value, -1, implicit, implicit, style);
ok = yaml_scalar_event_initialize(
&event,
(yaml_char_t *) get_anchor('&', line, anchor),
(yaml_char_t *) get_tag(line, tag),
(yaml_char_t *) value,
-1,
implicit,
implicit,
style
);
}
else if (strncmp(line, "=ALI", 4) == 0) {
......@@ -86,7 +120,8 @@
}
else if (strncmp(line, "=ALI", 4) == 0) {
ok = yaml_alias_event_initialize(&event, (yaml_char_t *)
get_anchor('*', line, anchor)
ok = yaml_alias_event_initialize(
&event,
(yaml_char_t *) get_anchor('*', line, anchor)
);
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment