Commit 847b6e15 by Tom de Vries Committed by Tom de Vries

check_GNU_style.sh: Declare local vars with local

2015-05-18  Tom de Vries  <tom@codesourcery.com>

	* check_GNU_style.sh (g, ag, vg, col): Declare local vars with local.

From-SVN: r223283
parent 7e425ad6
2015-05-18 Tom de Vries <tom@codesourcery.com> 2015-05-18 Tom de Vries <tom@codesourcery.com>
* check_GNU_style.sh (g, ag, vg, col): Declare local vars with local.
2015-05-18 Tom de Vries <tom@codesourcery.com>
* check_GNU_style.sh: Improve readability function calls. * check_GNU_style.sh: Improve readability function calls.
2015-05-12 Tom de Vries <tom@codesourcery.com> 2015-05-12 Tom de Vries <tom@codesourcery.com>
......
...@@ -82,8 +82,8 @@ grep $format '^+' $files \ ...@@ -82,8 +82,8 @@ grep $format '^+' $files \
# Grep # Grep
g (){ g (){
msg="$1" local msg="$1"
arg="$2" local arg="$2"
cat $inp \ cat $inp \
| egrep --color=always -- "$arg" \ | egrep --color=always -- "$arg" \
> $tmp && printf "\n$msg\n" > $tmp && printf "\n$msg\n"
...@@ -92,9 +92,9 @@ g (){ ...@@ -92,9 +92,9 @@ g (){
# And Grep # And Grep
ag (){ ag (){
msg="$1" local msg="$1"
arg1="$2" local arg1="$2"
arg2="$3" local arg2="$3"
cat $inp \ cat $inp \
| egrep --color=always -- "$arg1" \ | egrep --color=always -- "$arg1" \
| egrep --color=always -- "$arg2" \ | egrep --color=always -- "$arg2" \
...@@ -104,9 +104,9 @@ ag (){ ...@@ -104,9 +104,9 @@ ag (){
# reVerse Grep # reVerse Grep
vg (){ vg (){
msg="$1" local msg="$1"
varg="$2" local varg="$2"
arg="$3" local arg="$3"
cat $inp \ cat $inp \
| egrep -v -- "$varg" \ | egrep -v -- "$varg" \
| egrep --color=always -- "$arg" \ | egrep --color=always -- "$arg" \
...@@ -115,7 +115,7 @@ vg (){ ...@@ -115,7 +115,7 @@ vg (){
} }
col (){ col (){
msg="$1" local msg="$1"
local first=true local first=true
local f local f
for f in $files; do for f in $files; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment