bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eliminate TABs in indentation


From: Jim Meyering
Subject: Re: eliminate TABs in indentation
Date: Thu, 08 Apr 2010 20:35:28 +0200

Jim Meyering wrote:
> I've been promising/threatening this change for a while.
>
> This makes it so the code is now consistent with HACKING's
> "Use SPACE-only indentation in all[*] files" section.
>
>   http://git.savannah.gnu.org/cgit/grep.git/tree/HACKING#n236
>
> In case you have large pending patches and fear massive merge conflicts,
> don't worry.
>
> I've just proved that it's easy to migrate big changes past the
> indentation change by rebasing 25 or 30 csets (albeit all small) across
> the divide.  I used the same tool/procedure as described here:
>
>   http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/19811/focus=19909

While it passed "make distcheck" and "make syntax-check"
from my build directory, it failed from a clean bootstrap,
as reported by Hydra:

  http://hydra.nixos.org/jobset/gnu/grep-master

Here's the fix I'm about to push:

>From 2b3b49cb19f19a28f119ced3d6d6dba1e75fe886 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 8 Apr 2010 20:33:57 +0200
Subject: [PATCH] maint: undo TAB-conversion change to gl/lib/*.c.diff

This fixes a bootstrap failure due to the patches not applying.
* .x-sc_prohibit_tab_based_indentation: Add ^gl/lib/.*\.c\.diff$
* gl/lib/regcomp.c.diff: Revert today's TAB->space change.
* gl/lib/regex_internal.c.diff: Likewise.
* gl/lib/regexec.c.diff: Likewise.
---
 .x-sc_prohibit_tab_based_indentation |    1 +
 gl/lib/regcomp.c.diff                |    6 +++---
 gl/lib/regex_internal.c.diff         |    4 ++--
 gl/lib/regexec.c.diff                |    2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.x-sc_prohibit_tab_based_indentation 
b/.x-sc_prohibit_tab_based_indentation
index 6500293..2c46b77 100644
--- a/.x-sc_prohibit_tab_based_indentation
+++ b/.x-sc_prohibit_tab_based_indentation
@@ -1,3 +1,4 @@
 (^|/)ChangeLog[^/]*$
 (^|/)(GNU)?[Mm]akefile[^/]*$
 \.(am|mk)$
+^gl/lib/.*\.c\.diff$
diff --git a/gl/lib/regcomp.c.diff b/gl/lib/regcomp.c.diff
index a3be422..63fc187 100644
--- a/gl/lib/regcomp.c.diff
+++ b/gl/lib/regcomp.c.diff
@@ -8,7 +8,7 @@ index d5968bd..4926676 100644
  size_t
 -regerror (int errcode, const regex_t *_Restrict_ preg,
 +regerror (int errcode, const regex_t *_Restrict_ preg _UNUSED_PARAMETER_,
-          char *_Restrict_ errbuf, size_t errbuf_size)
+         char *_Restrict_ errbuf, size_t errbuf_size)
  #endif
  {
 @@ -1383,7 +1383,7 @@ calc_first (void *extra, bin_tree_t *node)
@@ -28,7 +28,7 @@ index d5968bd..4926676 100644
 +                      re_charset_t *mbcset _UNUSED_PARAMETER_,
 +                      Idx *coll_sym_alloc _UNUSED_PARAMETER_,
  # endif
-                        const unsigned char *name)
+                       const unsigned char *name)
  {
 @@ -3323,7 +3324,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, 
re_token_t *token,

@@ -37,7 +37,7 @@ index d5968bd..4926676 100644
 -                     re_token_t *token, int token_len, re_dfa_t *dfa,
 +                     re_token_t *token, int token_len,
 +                     re_dfa_t *dfa _UNUSED_PARAMETER_,
-                       reg_syntax_t syntax, bool accept_hyphen)
+                      reg_syntax_t syntax, bool accept_hyphen)
  {
  #ifdef RE_ENABLE_I18N
 @@ -3410,8 +3412,9 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t 
*regexp,
diff --git a/gl/lib/regex_internal.c.diff b/gl/lib/regex_internal.c.diff
index 0cb9d85..2cede3c 100644
--- a/gl/lib/regex_internal.c.diff
+++ b/gl/lib/regex_internal.c.diff
@@ -9,8 +9,8 @@ index 904b88e..61c8d9d 100644
 +#include "verify.h"
 +#include "intprops.h"
  static void re_string_construct_common (const char *str, Idx len,
-                                        re_string_t *pstr,
-                                        RE_TRANSLATE_TYPE trans, bool icase,
+                                       re_string_t *pstr,
+                                       RE_TRANSLATE_TYPE trans, bool icase,
 @@ -1390,7 +1392,10 @@ static void
  internal_function
  re_node_set_remove_at (re_node_set *set, Idx idx)
diff --git a/gl/lib/regexec.c.diff b/gl/lib/regexec.c.diff
index 37a7c55..d9b6d1c 100644
--- a/gl/lib/regexec.c.diff
+++ b/gl/lib/regexec.c.diff
@@ -9,7 +9,7 @@ index 21a8166..7762437 100644
 +#include "verify.h"
 +#include "intprops.h"
  static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
-                                     Idx n) internal_function;
+                                    Idx n) internal_function;
  static void match_ctx_clean (re_match_context_t *mctx) internal_function;
 @@ -378,8 +380,11 @@ re_search_2_stub (struct re_pattern_buffer *bufp,
    Idx len = length1 + length2;
--
1.7.1.rc0.239.g8b27e




reply via email to

[Prev in Thread] Current Thread [Next in Thread]