dot: allow extra configuration via environment

* src/tgbaalgos/dotty.cc, src/taalgos/dotty.cc: Honnor the SPOT_DOTEXTRA
environement variable.
* src/tgbatest/readsave.test, wrap/python/tests/automata.ipynb: Test it.
* NEWS, src/bin/man/spot-x.x: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-16 17:19:37 +01:00
parent b6762b7dc9
commit 7caf2b83d6
6 changed files with 77 additions and 45 deletions

View file

@ -30,6 +30,7 @@
#include "tgba/tgbagraph.hh"
#include "tgba/formula2bdd.hh"
#include "tgbaalgos/sccinfo.hh"
#include <cstdlib>
namespace spot
{
@ -108,6 +109,12 @@ namespace spot
}
if (opt_circles_)
os_ << " node [shape=\"circle\"]\n";
// Any extra text passed in the SPOT_DOTEXTRA environment
// variable should be output at the end of the "header", so
// that our setup can be overridden.
static const char* extra = getenv("SPOT_DOTEXTRA");
if (extra)
os_ << " " << extra << '\n';
os_ << " I [label=\"\", style=invis, ";
os_ << (opt_horizontal_ ? "width" : "height");
os_ << "=0]\n I -> " << aut_->get_init_state_number() << '\n';