diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-06-10 08:28:06 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-06-10 08:28:06 +0200 |
commit | 63929c2efaef82fa283983d989a08a79cff2e99a (patch) | |
tree | 79af3819f0e920656f638c3a628ce5eed5a4c755 | |
parent | 7ef60797d995efb75738f2b2687c0a3c6137df99 (diff) | |
download | ruamel.yaml-63929c2efaef82fa283983d989a08a79cff2e99a.tar.gz |
more typos and trailing whitespace
-rw-r--r-- | ext/emitter.c | 17 | ||||
-rw-r--r-- | ext/parser.c | 3 | ||||
-rw-r--r-- | ext/reader.c | 7 | ||||
-rw-r--r-- | ext/scanner.c | 17 | ||||
-rw-r--r-- | ext/writer.c | 3 | ||||
-rw-r--r-- | ext/yaml.h | 9 | ||||
-rw-r--r-- | ext/yaml_private.h | 5 |
7 files changed, 27 insertions, 34 deletions
diff --git a/ext/emitter.c b/ext/emitter.c index c4b56a2..c593a7d 100644 --- a/ext/emitter.c +++ b/ext/emitter.c @@ -517,7 +517,7 @@ yaml_emitter_emit_stream_start(yaml_emitter_t *emitter, if (emitter->best_width < 0) { emitter->best_width = INT_MAX; } - + if (!emitter->line_break) { emitter->line_break = YAML_LN_BREAK; } @@ -607,7 +607,7 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter, if (!yaml_emitter_write_indent(emitter)) return 0; } - + if (event->data.document_start.tag_directives.start != event->data.document_start.tag_directives.end) { implicit = 0; @@ -721,7 +721,7 @@ yaml_emitter_emit_document_end(yaml_emitter_t *emitter, } /* - * + * * Expect a flow item node. */ @@ -1402,7 +1402,7 @@ yaml_emitter_analyze_anchor(yaml_emitter_t *emitter, { size_t anchor_length; yaml_string_t string; - + anchor_length = strlen((char *)anchor); STRING_ASSIGN(string, anchor, anchor_length); @@ -1493,7 +1493,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter, int break_space = 0; int space_break = 0; - int preceeded_by_whitespace = 0; + int preceded_by_whitespace = 0; int followed_by_whitespace = 0; int previous_space = 0; int previous_break = 0; @@ -1524,7 +1524,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter, flow_indicators = 1; } - preceeded_by_whitespace = 1; + preceded_by_whitespace = 1; followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string)); while (string.pointer != string.end) @@ -1570,7 +1570,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter, } } - if (CHECK(string, '#') && preceeded_by_whitespace) { + if (CHECK(string, '#') && preceded_by_whitespace) { flow_indicators = 1; block_indicators = 1; } @@ -1619,7 +1619,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter, previous_break = 0; } - preceeded_by_whitespace = IS_BLANKZ(string); + preceded_by_whitespace = IS_BLANKZ(string); MOVE(string); if (string.pointer != string.end) { followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string)); @@ -2326,4 +2326,3 @@ yaml_emitter_write_folded_scalar(yaml_emitter_t *emitter, return 1; } - diff --git a/ext/parser.c b/ext/parser.c index eb2a2c7..5013339 100644 --- a/ext/parser.c +++ b/ext/parser.c @@ -1295,7 +1295,7 @@ yaml_parser_process_directives(yaml_parser_t *parser, token = PEEK_TOKEN(parser); if (!token) goto error; } - + for (default_tag_directive = default_tag_directives; default_tag_directive->handle; default_tag_directive++) { if (!yaml_parser_append_tag_directive(parser, *default_tag_directive, 1, @@ -1371,4 +1371,3 @@ error: yaml_free(copy.prefix); return 0; } - diff --git a/ext/reader.c b/ext/reader.c index d47921c..a635ced 100644 --- a/ext/reader.c +++ b/ext/reader.c @@ -52,7 +52,7 @@ yaml_parser_determine_encoding(yaml_parser_t *parser) { /* Ensure that we had enough bytes in the raw buffer. */ - while (!parser->eof + while (!parser->eof && parser->raw_buffer.last - parser->raw_buffer.pointer < 3) { if (!yaml_parser_update_raw_buffer(parser)) { return 0; @@ -295,7 +295,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length) parser->offset, value); break; - + case YAML_UTF16LE_ENCODING: case YAML_UTF16BE_ENCODING: @@ -318,7 +318,7 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length) * * The following formulas are used for decoding * and encoding characters using surrogate pairs: - * + * * U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) * U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) * W1 = 110110yyyyyyyyyy @@ -466,4 +466,3 @@ yaml_parser_update_buffer(yaml_parser_t *parser, size_t length) return 1; } - diff --git a/ext/scanner.c b/ext/scanner.c index 4ead19c..bf2358a 100644 --- a/ext/scanner.c +++ b/ext/scanner.c @@ -70,7 +70,7 @@ * %TAG !yaml! tag:yaml.org,2002: * --- * - * The correspoding sequence of tokens: + * The corresponding sequence of tokens: * * STREAM-START(utf-8) * VERSION-DIRECTIVE(1,1) @@ -762,7 +762,7 @@ yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token) } /* Fetch the next token from the queue. */ - + *token = DEQUEUE(parser, parser->tokens); parser->token_available = 0; parser->tokens_parsed ++; @@ -1114,7 +1114,7 @@ yaml_parser_save_simple_key(yaml_parser_t *parser) yaml_simple_key_t simple_key; simple_key.possible = 1; simple_key.required = required; - simple_key.token_number = + simple_key.token_number = parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head); simple_key.mark = parser->mark; @@ -1200,7 +1200,7 @@ yaml_parser_decrease_flow_level(yaml_parser_t *parser) * Push the current indentation level to the stack and set the new level * the current column is greater than the indentation level. In this case, * append or insert the specified token into the token queue. - * + * */ static int @@ -1938,7 +1938,7 @@ yaml_parser_scan_to_next_token(yaml_parser_t *parser) * * - in the flow context; * - in the block context, but not at the beginning of the line or - * after '-', '?', or ':' (complex value). + * after '-', '?', or ':' (complex value). */ if (!CACHE(parser, 1)) return 0; @@ -3007,7 +3007,7 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser, *indent = 1; } - return 1; + return 1; } /* @@ -3504,12 +3504,12 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token) { if (IS_BLANK(parser->buffer)) { - /* Check for tab character that abuse indentation. */ + /* Check for tab characters that abuse indentation. */ if (leading_blanks && (int)parser->mark.column < indent && IS_TAB(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violate indentation"); + start_mark, "found a tab character that violates indentation"); goto error; } @@ -3573,4 +3573,3 @@ error: return 0; } - diff --git a/ext/writer.c b/ext/writer.c index b90019f..964973e 100644 --- a/ext/writer.c +++ b/ext/writer.c @@ -74,7 +74,7 @@ yaml_emitter_flush(yaml_emitter_t *emitter) unsigned int value; size_t k; - /* + /* * See the "reader.c" code for more details on UTF-8 encoding. Note * that we assume that the buffer contains a valid UTF-8 sequence. */ @@ -138,4 +138,3 @@ yaml_emitter_flush(yaml_emitter_t *emitter) return yaml_emitter_set_writer_error(emitter, "write error"); } } - @@ -1,7 +1,7 @@ /** * @file yaml.h * @brief Public interface for libyaml. - * + * * Include the header file with the code: * @code * #include <yaml.h> @@ -388,7 +388,7 @@ typedef struct yaml_event_s { /** The event data. */ union { - + /** The stream parameters (for @c YAML_STREAM_START_EVENT). */ struct { /** The document encoding. */ @@ -724,7 +724,7 @@ struct yaml_node_s { /** The node data. */ union { - + /** The scalar parameters (for @c YAML_SCALAR_NODE). */ struct { /** The scalar value. */ @@ -1089,7 +1089,7 @@ typedef struct yaml_parser_s { yaml_error_type_t error; /** Error description. */ const char *problem; - /** The byte about which the problem occured. */ + /** The byte about which the problem occurred. */ size_t problem_offset; /** The problematic value (@c -1 is none). */ int problem_value; @@ -1968,4 +1968,3 @@ yaml_emitter_flush(yaml_emitter_t *emitter); #endif #endif /* #ifndef YAML_H */ - diff --git a/ext/yaml_private.h b/ext/yaml_private.h index 15d0660..6917448 100644 --- a/ext/yaml_private.h +++ b/ext/yaml_private.h @@ -240,9 +240,9 @@ yaml_string_join( (string).pointer[offset] <= (yaml_char_t) 'f') ? \ ((string).pointer[offset] - (yaml_char_t) 'a' + 10) : \ ((string).pointer[offset] - (yaml_char_t) '0')) - + #define AS_HEX(string) AS_HEX_AT((string),0) - + /* * Check if the character is ASCII. */ @@ -655,4 +655,3 @@ yaml_queue_extend(void **start, void **head, void **tail, void **end); (node).data.mapping.pairs.end = (node_pairs_end), \ (node).data.mapping.pairs.top = (node_pairs_start), \ (node).data.mapping.style = (node_style)) - |