diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-08 18:39:24 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-04-08 19:29:42 +0200 |
commit | 699bcc4bd8166abb6ee26a37d9e1189817741277 (patch) | |
tree | b57f4c9bc3bf24c6b565f78966dc20ff98a4c36a /src/searchutils.c | |
parent | e4f69c178ee9e68ecdbd743de669ec8c1388e40f (diff) | |
download | grep-699bcc4bd8166abb6ee26a37d9e1189817741277.tar.gz |
convert all TABs to equivalent spaces in indentation
Using this file,
cat > leading-blank.exempt <<\EOF
(?:^|\/)ChangeLog[^/]*$
(?:^|\/)(?:GNU)?[Mm]akefile[^/]*$
\.(?:am|mk)$
EOF
run this command to convert all non-conforming leading white
space to be all spaces:
git ls-files \
| pcregrep -vf leading-blank.exempt \
| xargs pcregrep -l '^ *\t' \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'src/searchutils.c')
-rw-r--r-- | src/searchutils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/searchutils.c b/src/searchutils.c index ee7d9ae4..11924856 100644 --- a/src/searchutils.c +++ b/src/searchutils.c @@ -121,7 +121,7 @@ mbtolower (const char *beg, size_t *n) bool is_mb_middle (const char **good, const char *buf, const char *end, - size_t match_len) + size_t match_len) { const char *p = *good; const char *prev = p; @@ -138,12 +138,12 @@ is_mb_middle (const char **good, const char *buf, const char *end, prev = p; if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) - { - /* An invalid sequence, or a truncated multibyte character. - We treat it as a single byte character. */ - mbclen = 1; - memset(&cur_state, 0, sizeof cur_state); - } + { + /* An invalid sequence, or a truncated multibyte character. + We treat it as a single byte character. */ + mbclen = 1; + memset(&cur_state, 0, sizeof cur_state); + } p += mbclen; } |