diff options
author | Jim Meyering <meyering@fb.com> | 2019-01-05 22:04:57 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2019-01-05 22:47:23 -0800 |
commit | badccffea49ddc26b72208366f00429cc7ffb9e1 (patch) | |
tree | 67540e209f66e920565f43c84cff6f3f7fed978a /lib/prepargs.c | |
parent | 601eceb57cfb87ded594701acc401277c53ff837 (diff) | |
download | diffutils-badccffea49ddc26b72208366f00429cc7ffb9e1.tar.gz |
maint: convert all TABs to equivalent spaces in indentation
Using this file,
cat > leading-blank.exempt <<\EOF
(\.gitmodules|help2man|pre-commit)$
(?:^|\/)ChangeLog[^/]*$
(?:^|\/)(?:GNU)?[Mm]akefile[^/]*$
\.(?:am|mk)$
EOF
run the following 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 : $_'
Since that changed old NEWS, I also ran "make update-NEWS-hash"
to update the old_NEWS_hash value in cfg.mk.
Diffstat (limited to 'lib/prepargs.c')
-rw-r--r-- | lib/prepargs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/prepargs.c b/lib/prepargs.c index 2719981..4e7af9e 100644 --- a/lib/prepargs.c +++ b/lib/prepargs.c @@ -52,16 +52,16 @@ prepend_args (char const *options, char *buf, char **argv) for (;;) { while (ISSPACE ((unsigned char) *o)) - o++; + o++; if (!*o) - return n; + return n; if (argv) - argv[n] = b; + argv[n] = b; n++; do - if ((*b++ = *o++) == '\\' && *o) - b[-1] = *o++; + if ((*b++ = *o++) == '\\' && *o) + b[-1] = *o++; while (*o && ! ISSPACE ((unsigned char) *o)); *b++ = '\0'; @@ -86,6 +86,6 @@ prepend_default_options (char const *options, int *pargc, char ***pargv) *pp++ = *argv++; pp += prepend_args (options, buf, pp); while ((*pp++ = *argv++)) - continue; + continue; } } |