[Scummvm-cvs-logs] SF.net SVN: scummvm:[41863] tools/branches/gsoc2009-decompiler/decompiler

kjdf at users.sourceforge.net kjdf at users.sourceforge.net
Thu Jun 25 13:24:55 CEST 2009


Revision: 41863
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41863&view=rev
Author:   kjdf
Date:     2009-06-25 11:24:55 +0000 (Thu, 25 Jun 2009)

Log Message:
-----------
decompiler: font selection for graphviz output

Modified Paths:
--------------
    tools/branches/gsoc2009-decompiler/decompiler/cfg.h
    tools/branches/gsoc2009-decompiler/decompiler/decompiler.cpp

Modified: tools/branches/gsoc2009-decompiler/decompiler/cfg.h
===================================================================
--- tools/branches/gsoc2009-decompiler/decompiler/cfg.h	2009-06-25 11:09:49 UTC (rev 41862)
+++ tools/branches/gsoc2009-decompiler/decompiler/cfg.h	2009-06-25 11:24:55 UTC (rev 41863)
@@ -59,8 +59,8 @@
 		return ret.str();
 	}
 
-	void printDot(ostream &out) {
-		out << _graph.graphvizPrint(printer);
+	void printDot(ostream &out, const string &fontname = "Courier") {
+		out << _graph.graphvizPrint(printer, fontname);
 	}
 
 	void removeJumpsToJumps() {

Modified: tools/branches/gsoc2009-decompiler/decompiler/decompiler.cpp
===================================================================
--- tools/branches/gsoc2009-decompiler/decompiler/decompiler.cpp	2009-06-25 11:09:49 UTC (rev 41862)
+++ tools/branches/gsoc2009-decompiler/decompiler/decompiler.cpp	2009-06-25 11:24:55 UTC (rev 41863)
@@ -17,7 +17,8 @@
 		("disasm", "print disassembly and exit")
 		("blocks", "print basic blocks and exit")
 		("graph",  "print graph and exit")
-		("derive", value<int>()->default_value(0), "find arg-th order intervals");
+		("derive", value<int>()->default_value(0), "find arg-th order intervals")
+		("fontname", value<string>()->default_value("Courier"), "font to use with graphical output");
 	options_description options("Allowed options");
 	options.add(visible).add_options()
 		("inputfile", value<string>(), "input file");
@@ -61,7 +62,7 @@
 		for (int i = 0; i < vars["derive"].as<int>(); i++)
 			g.extendIntervals();
 		g.loopStruct();
-		cfg.printDot(cout);
+		cfg.printDot(cout, vars["fontname"].as<string>());
 		exit(0);
 	}
 	return 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list