Commit 3e968a3c authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/sanity/style.test: Check the iface/ tree too.

* iface/gspn/gspn.cc, iface/gspn/ssp.cc: Fix style.
parent da2d2e19
2004-05-21 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/sanity/style.test: Check the iface/ tree too.
* iface/gspn/gspn.cc, iface/gspn/ssp.cc: Fix style.
* src/sanity/80columns.test: Check the iface/ tree too.
* iface/gspn/dcswaveltl.test, iface/gspn/dcswavefm.test,
iface/gspn/dcswaveeltl.test, iface/gspn/udcsltl.test,
......
......@@ -201,7 +201,7 @@ namespace spot
assert(successors_);
// GSPN is expected to return a looping "dead" transition where
// there is no successor.
assert(size_> 0);
assert(size_ > 0);
}
virtual
......
......@@ -40,7 +40,7 @@ namespace spot
assert(new_size);
bdd* tmp = new bdd[new_size];
for(int i = 0; i < size; i++)
for (int i = 0; i < size; i++)
tmp[i] = t[i];
delete[] t;
......@@ -195,7 +195,7 @@ namespace spot
~tgba_succ_iterator_gspn_ssp()
{
for(size_t i = 0; i < size_states_; i++)
for (size_t i = 0; i < size_states_; i++)
delete state_array_[i];
delete[] bdd_array_;
......@@ -216,8 +216,8 @@ namespace spot
virtual void
first()
{
if(!successors_)
return ;
if (!successors_)
return;
current_succ_=0;
}
......@@ -385,10 +385,10 @@ namespace spot
state_array = (state**) realloc(state_array,
(size_states + 1) * sizeof(state*));
state_array[size_states] = i->current_state();
props_[nb_arc_props].arc->curr_state = size_states ;
props_[nb_arc_props].arc->curr_state = size_states;
size_states++;
while (all_conds_ != bddfalse )
while (all_conds_ != bddfalse)
{
cond = bdd_satone(all_conds_);
cond = bdd_simplify(cond, cond | outside_);
......@@ -444,16 +444,16 @@ namespace spot
for (j = 0; j < nb_arc_props; j++)
{
for (conj = 0 ; conj < props_[j].nb_conj ; conj++)
for (conj = 0; conj < props_[j].nb_conj; conj++)
free(props_[j].prop[conj]);
free(props_[j].prop);
}
delete i;
return new tgba_succ_iterator_gspn_ssp(succ_tgba_, size_tgba_,
bdd_array, state_array,
size_states, props_,
nb_arc_props);
bdd_array, state_array,
size_states, props_,
nb_arc_props);
}
bdd
......@@ -672,7 +672,7 @@ namespace spot
if (old_state->left()
&& new_state->left()
&& spot_inclusion(new_state->left(),old_state->left()))
&& spot_inclusion(new_state->left(), old_state->left()))
break;
}
}
......@@ -715,7 +715,7 @@ namespace spot
if (old_state->left()
&& new_state->left()
&& spot_inclusion(new_state->left(),old_state->left()))
&& spot_inclusion(new_state->left(), old_state->left()))
break;
}
}
......
......@@ -21,79 +21,82 @@ export GREP_COLOR
tmp=incltest.tmp
find "${INCDIR-..}" \( -name "${1-*}.hh" -o -name "${1-*}.cc" \) \
-a -type f -a -print |
while read file; do
if grep 'GNU Bison' "$file" >/dev/null ||
for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
find "$dir" \( -name "${1-*}.hh" -o -name "${1-*}.cc" \) \
-a -type f -a -print |
while read file; do
if grep 'GNU Bison' "$file" >/dev/null ||
grep 'generated by flex' "$file" >/dev/null ; then
continue
fi
fi
fail=false
fail=false
sed 's,//.*,,' < $file > $tmp
sed 's,//.*,,' < $file > $tmp
grep '[ ]if(' $tmp &&
diag 'Missing space after "if"'
grep '[ ]if(' $tmp &&
diag 'Missing space after "if"'
grep '[ ]if (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]if (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]if (.*).*;' $tmp &&
diag 'if body should be on another line.'
grep '[ ]if (.*).*;' $tmp &&
diag 'if body should be on another line.'
grep '[ ]while(' $tmp &&
diag 'Missing space after "while"'
grep '[ ]while(' $tmp &&
diag 'Missing space after "while"'
grep '[ ]while (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]while (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]while (.*).*[^)];' $tmp &&
diag 'while body should be on another line.'
grep '[ ]while (.*).*[^)];' $tmp &&
diag 'while body should be on another line.'
grep '[ ]for(' $tmp &&
diag 'Missing space after "for"'
grep '[ ]for(' $tmp &&
diag 'Missing space after "for"'
grep '[ ]for (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]for (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]for (.*;.*;.*).*;' $tmp &&
diag 'for body should be on another line.'
grep '[ ]for (.*;.*;.*).*;' $tmp &&
diag 'for body should be on another line.'
grep '[ ]switch(' $tmp &&
diag 'Missing space after "switch"'
grep '[ ]switch(' $tmp &&
diag 'Missing space after "switch"'
grep '[ ]switch (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '[ ]switch (.*).*{' $tmp &&
diag 'Opening { should be on its own line.'
grep '( ' $tmp &&
diag 'No space after opening (.'
grep '( ' $tmp &&
diag 'No space after opening (.'
grep ' )' $tmp &&
diag 'No space before closing ).'
grep ' )' $tmp &&
diag 'No space before closing ).'
grep '! ' $tmp &&
diag 'No space after unary operators (!).'
grep '! ' $tmp &&
diag 'No space after unary operators (!).'
grep ',[(a-zA-Z+=_!]' $tmp &&
diag 'Space after coma.'
grep ',[(a-zA-Z+=_!]' $tmp &&
diag 'Space after coma.'
grep '[^ ]&&[^ ]' $tmp &&
diag 'Space arround binary operators.'
grep '[^ ]&&[^ ]' $tmp &&
diag 'Space arround binary operators.'
grep '[^ ]||[^ ]' $tmp &&
diag 'Space arround binary operators.'
grep '[^ ]||[^ ]' $tmp &&
diag 'Space arround binary operators.'
grep '[ ]default:[^:].*;' $tmp &&
diag 'Label should be on their own line.'
grep '[ ]default:[^:].*;' $tmp &&
diag 'Label should be on their own line.'
grep '[ ]case.*:[^:].*;' $tmp &&
diag 'Label should be on their own line.'
grep '[ ]case.*:[^:].*;' $tmp &&
diag 'Label should be on their own line.'
grep '[ ];' $tmp &&
diag 'No space before semicolon.'
grep '[ ];' $tmp &&
diag 'No space before semicolon.'
$fail && echo "$file" >>failures
$fail && echo "$file" >>failures
done
done
if test -f failures; then
......
Supports Markdown
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