Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
84b1fbfd
Commit
84b1fbfd
authored
Aug 08, 2012
by
John Koleszar
Browse files
ftfy: update to match current astyle rule
Change-Id: I89076d93968a5817d6d0330ec7fd6a6c73fe397f
parent
a3ff6259
Changes
2
Hide whitespace changes
Inline
Side-by-side
tools/ftfy.sh
View file @
84b1fbfd
...
...
@@ -29,12 +29,13 @@ log() {
vpx_style
()
{
astyle
--style
=
bsd
--min-conditional-indent
=
0
--break-blocks
\
--pad-oper
--pad-header
--unpad-paren
\
--align-pointer
=
name
\
--indent-preprocessor
--convert-tabs
--indent-labels
\
--suffix
=
none
--quiet
"
$@
"
sed
-i
""
's/[[:space:]]\{1,\},/,/g'
"
$@
"
for
f
;
do
case
"
$f
"
in
*
.h|
*
.c|
*
.cc
)
"
${
dirname_self
}
"
/vpx-astyle.sh
"
$f
"
;;
esac
done
}
...
...
@@ -119,8 +120,7 @@ cd "$(git rev-parse --show-toplevel)"
git show
>
"
${
ORIG_DIFF
}
"
# Apply the style guide on new and modified files and collect its diff
for
f
in
$(
git diff HEAD^
--name-only
-M90
--diff-filter
=
AM
\
|
grep
'\.[ch]$'
)
;
do
for
f
in
$(
git diff HEAD^
--name-only
-M90
--diff-filter
=
AM
)
;
do
case
"
$f
"
in
third_party/
*
)
continue
;;
nestegg/
*
)
continue
;;
...
...
tools/vpx-astyle.sh
0 → 100755
View file @
84b1fbfd
#!/bin/sh
set
-e
astyle
--style
=
java
--indent
=
spaces
=
2
--indent-switches
\
--min-conditional-indent
=
0
\
--pad-oper
--pad-header
--unpad-paren
\
--align-pointer
=
name
\
--indent-preprocessor
--convert-tabs
--indent-labels
\
--suffix
=
none
--quiet
--max-instatement-indent
=
80
"
$@
"
# Disabled, too greedy?
#sed -i 's;[[:space:]]\{1,\}\[;[;g' "$@"
sed_i
()
{
# Incompatible sed parameter parsing.
if
sed
-i
2>&1 |
grep
-q
'requires an argument'
;
then
sed
-i
''
"
$@
"
else
sed
-i
"
$@
"
fi
}
sed_i
-e
's/[[:space:]]\{1,\}\([,;]\)/\1/g'
\
-e
's/[[:space:]]\{1,\}\([+-]\{2\};\)/\1/g'
\
-e
's/,[[:space:]]*}/}/g'
\
-e
's;//\([^/[:space:]].*$\);// \1;g'
\
-e
's/^\(public\|private\|protected\):$/ \1:/g'
\
-e
's/[[:space:]]\{1,\}$//g'
\
"
$@
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment