diff options
author | Jim Meyering <meyering@fb.com> | 2014-09-14 19:54:43 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-30 18:59:34 -0800 |
commit | 79c126b38e1065ae00639a0d59512c98800ca519 (patch) | |
tree | 77c5fb5f4e27d1cc3b23ed2ba1d725f60f6b7f39 | |
parent | 8ad1b31305297df63a04919ad1bd9b94dec9aeb4 (diff) | |
download | sed-79c126b38e1065ae00639a0d59512c98800ca519.tar.gz |
maint: enable sc_space_tab syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* doc/groupify.sed: Reverse SP-TAB sequences.
* sed/compile.c (compile_program): Remove spaces before TAB.
* sed/execute.c (append_replacement): Likewise.
-rw-r--r-- | cfg.mk | 3 | ||||
-rwxr-xr-x | doc/groupify.sed | 4 | ||||
-rw-r--r-- | sed/compile.c | 2 | ||||
-rw-r--r-- | sed/execute.c | 2 |
4 files changed, 6 insertions, 5 deletions
@@ -39,7 +39,6 @@ local-checks-to-skip = \ sc_prohibit_magic_number_exit \ sc_prohibit_strcmp \ sc_prohibit_strncpy \ - sc_space_tab \ sc_prohibit_tab_based_indentation \ sc_texinfo_acronym \ sc_unmarked_diagnostics \ @@ -140,3 +139,5 @@ exclude_file_name_regexp--sc_prohibit_doubled_word = \ ^testsuite/(mac-mf|uniq)\.(good|inp)$$ exclude_file_name_regexp--sc_program_name = ^testsuite/.*\.c$$ + +exclude_file_name_regexp--sc_space_tab = ^testsuite/.*$$ diff --git a/doc/groupify.sed b/doc/groupify.sed index 2430710..c733b82 100755 --- a/doc/groupify.sed +++ b/doc/groupify.sed @@ -25,7 +25,7 @@ n p b } -/^[ ]*$/ { +/^[ ]*$/ { p bb } @@ -35,7 +35,7 @@ h :c n /^@end example/! { - /^[ ]*$/! { + /^[ ]*$/! { H bc } diff --git a/sed/compile.c b/sed/compile.c index 76e7d0a..07e3837 100644 --- a/sed/compile.c +++ b/sed/compile.c @@ -1280,7 +1280,7 @@ compile_program(vector) len = normalize_text(src_buf, size_buffer (b), TEXT_BUFFER); if ( !(b2 = match_slash(slash, false)) ) - bad_prog(_(UNTERM_Y_CMD)); + bad_prog(_(UNTERM_Y_CMD)); dest_buf = get_buffer(b2); dest_len = normalize_text(dest_buf, size_buffer (b2), TEXT_BUFFER); diff --git a/sed/execute.c b/sed/execute.c index 9268524..39780ce 100644 --- a/sed/execute.c +++ b/sed/execute.c @@ -1027,7 +1027,7 @@ static void append_replacement (struct line *buf, struct replacement *p, if (p->prefix_length) { str_append_modified(buf, p->prefix, p->prefix_length, - curr_type); + curr_type); curr_type &= ~REPL_MODIFIERS; } |