diff --git a/ChangeLog b/ChangeLog index 3f8fc5c7a..071d6070e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2003-05-16 Alexandre Duret-Lutz + * src/ltlvisit/dump.hh (dump): Return the passed ostream. + * src/ltlvisit/dump.cc (dump): Likewise. + * src/ltlvisit/dotty.hh (dotty): Likewise. + * src/ltlvisit/dotty.cc (dotty): Likewise. + * src/ltlvisit/tostring.hh (to_string): Likewise. + * src/ltlvisit/tostring.cc (to_string): Likewise. + * src/ltlvisit/dump.hh (dump): Take a formula* as argument, not a formula&. This is more homogeneous. * src/ltlvisit/dump.cc (dump): Likewise. @@ -7,7 +14,7 @@ * src/ltlvisit/dotty.cc (dotty): Likewise. * src/ltlvisit/tostring.hh (to_string): Likewise. * src/ltlvisit/tostring.cc (to_string): Likewise. - * src/ltltest/readltl.cc, src/ltltest/equals.cc, + * src/ltltest/readltl.cc, src/ltltest/equals.cc, src/ltltest/tostring.cc: Adjust usage. Check trivial multop equality at build time. The makes the diff --git a/src/ltlvisit/dotty.cc b/src/ltlvisit/dotty.cc index 741a88a84..581713dca 100644 --- a/src/ltlvisit/dotty.cc +++ b/src/ltlvisit/dotty.cc @@ -94,13 +94,14 @@ namespace spot }; - void + std::ostream& dotty(const formula* f, std::ostream& os) { dotty_visitor v(os); os << "digraph G {" << std::endl; f->accept(v); os << "}" << std::endl; + return os; } } diff --git a/src/ltlvisit/dotty.hh b/src/ltlvisit/dotty.hh index f7de2b09a..6c25b2168 100644 --- a/src/ltlvisit/dotty.hh +++ b/src/ltlvisit/dotty.hh @@ -14,7 +14,7 @@ namespace spot /// /// \c dot is part of the GraphViz package /// http://www.research.att.com/sw/tools/graphviz/ - void dotty(const formula* f, std::ostream& os); + std::ostream& dotty(const formula* f, std::ostream& os); } } diff --git a/src/ltlvisit/dump.cc b/src/ltlvisit/dump.cc index 4996cf50a..c418a8983 100644 --- a/src/ltlvisit/dump.cc +++ b/src/ltlvisit/dump.cc @@ -68,11 +68,12 @@ namespace spot std::ostream& os_; }; - void + std::ostream& dump(const formula* f, std::ostream& os) { dump_visitor v(os); f->accept(v); + return os; } } diff --git a/src/ltlvisit/dump.hh b/src/ltlvisit/dump.hh index 3d0e6ed2e..d6498e2c4 100644 --- a/src/ltlvisit/dump.hh +++ b/src/ltlvisit/dump.hh @@ -13,7 +13,7 @@ namespace spot /// \param os The stream where it should be output. /// /// This is useful to display a formula when debugging. - void dump(const formula* f, std::ostream& os); + std::ostream& dump(const formula* f, std::ostream& os); } } diff --git a/src/ltlvisit/tostring.cc b/src/ltlvisit/tostring.cc index 43c141c51..909dc9488 100644 --- a/src/ltlvisit/tostring.cc +++ b/src/ltlvisit/tostring.cc @@ -114,11 +114,12 @@ namespace spot std::ostream& os_; }; - void + std::ostream& to_string(const formula* f, std::ostream& os) { to_string_visitor v(os); f->accept(v); + return os; } std::string diff --git a/src/ltlvisit/tostring.hh b/src/ltlvisit/tostring.hh index beb5f6a98..966932b45 100644 --- a/src/ltlvisit/tostring.hh +++ b/src/ltlvisit/tostring.hh @@ -8,7 +8,7 @@ namespace spot { namespace ltl { - void to_string(const formula* f, std::ostream& os); + std::ostream& to_string(const formula* f, std::ostream& os); std::string to_string(const formula* f); } }