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