[yast-commit] r54738 - /trunk/storage/libstorage/src/Graph.cc
Author: aschnell Date: Fri Jan 16 22:02:32 2009 New Revision: 54738 URL: http://svn.opensuse.org/viewcvs/yast?rev=54738&view=rev Log: - correct quoting in dot file Modified: trunk/storage/libstorage/src/Graph.cc Modified: trunk/storage/libstorage/src/Graph.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Graph.cc?rev=54738&r1=54737&r2=54738&view=diff ============================================================================== --- trunk/storage/libstorage/src/Graph.cc (original) +++ trunk/storage/libstorage/src/Graph.cc Fri Jan 16 22:02:32 2009 @@ -43,9 +43,9 @@ const string node2; }; - string dotQuote(const string& s) + string dotQuote(const string& str) { - return '"' + s + '"'; + return '"' + boost::replace_all_copy(str, "\"", "\\\"") + '"'; } std::ostream& operator<<(std::ostream& s, const Node& node) @@ -173,7 +173,7 @@ out << "digraph storage" << endl; out << "{" << endl; - out << " node [ shape=rectangle ];" << endl; + out << " node [shape=rectangle, style=filled];" << endl; out << endl; for (list<Node>::const_iterator node = nodes.begin(); node != nodes.end(); ++node) @@ -186,7 +186,7 @@ list<string> ids; for (list<Node>::const_iterator node = nodes.begin(); node != nodes.end(); ++node) if (node->rank == *rank) - ids.push_back(dotQuote(node->id) + ";"); + ids.push_back(dotQuote(node->id)); if (!ids.empty()) out << " { rank=same; " << boost::join(ids, " ") << " };" << endl; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org