style: make sure we do not have SPOT_API in *.cc files

* src/sanity/style.test: Check for it.
* src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc,
src/tgbaalgos/randomize.cc, src/tgbaalgos/stutter.cc: Fix all those.
This commit is contained in:
Alexandre Duret-Lutz 2015-01-09 16:15:58 +01:00
parent 5536bac4a1
commit a539dc9002
5 changed files with 16 additions and 11 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement de // Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et
// l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -123,7 +123,6 @@ namespace spot
return scc_filter_states(w.result()); return scc_filter_states(w.result());
} }
SPOT_API
tgba_digraph_ptr nra_to_nba(const const_dstar_aut_ptr& nra) tgba_digraph_ptr nra_to_nba(const const_dstar_aut_ptr& nra)
{ {
return nra_to_nba(nra, nra->aut); return nra_to_nba(nra, nra->aut);

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement // Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et
// de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -98,7 +98,6 @@ namespace spot
} }
SPOT_API
tgba_digraph_ptr nsa_to_tgba(const const_dstar_aut_ptr& nsa) tgba_digraph_ptr nsa_to_tgba(const const_dstar_aut_ptr& nsa)
{ {
assert(nsa->type == Streett); assert(nsa->type == Streett);

View file

@ -107,6 +107,13 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
perl -ne '/(.*\\brief.*\n.*\\ingroup.*)/ && print("$1\n") && exit(1)' \ perl -ne '/(.*\\brief.*\n.*\\ingroup.*)/ && print("$1\n") && exit(1)' \
-0777 $file || diag "always put 'ingroup' before 'brief'" -0777 $file || diag "always put 'ingroup' before 'brief'"
# Check this before we remove SPOT_API from the input.
case $file in
*.cc)
$GREP 'SPOT_API' $file &&
diag 'use SPOT_API only in header files';;
esac
# Strip comments and strings. # Strip comments and strings.
# #
# Multi-line comments of the form # Multi-line comments of the form
@ -119,7 +126,7 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
# // # //
# to keep the line numbers correct in the diagnostics. # to keep the line numbers correct in the diagnostics.
# #
# Also get read of the SPOT_API tags. # Also get rid of the SPOT_API tags.
perl -pe 'sub f {my $a = shift; $a =~ s:[^\n]*://:g; return "$a"} perl -pe 'sub f {my $a = shift; $a =~ s:[^\n]*://:g; return "$a"}
s,/\*(.*?)\*/,f($1),sge; s,/\*(.*?)\*/,f($1),sge;
s,//.*?\n,//\n,g; s,//.*?\n,//\n,g;

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2014 Laboratoire de Recherche et Développement de // Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
// l'Epita (LRDE). // de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -24,7 +24,7 @@
namespace spot namespace spot
{ {
SPOT_API void void
randomize(tgba_digraph_ptr& aut, bool randomize_states, randomize(tgba_digraph_ptr& aut, bool randomize_states,
bool randomize_transitions) bool randomize_transitions)
{ {

View file

@ -201,7 +201,7 @@ namespace spot
}; };
class SPOT_API tgbasl final : public tgba class tgbasl final : public tgba
{ {
public: public:
tgbasl(const const_tgba_ptr& a, bdd atomic_propositions) tgbasl(const const_tgba_ptr& a, bdd atomic_propositions)