From 6d80a38c876831aa141b58e757fbdf5663026f95 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 30 May 2017 15:53:09 +0200 Subject: dialyzer: Improve handling of Unicode --- lib/dialyzer/src/dialyzer_callgraph.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/dialyzer/src/dialyzer_callgraph.erl') diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl index 6387f3d1e4..a83a0bda59 100644 --- a/lib/dialyzer/src/dialyzer_callgraph.erl +++ b/lib/dialyzer/src/dialyzer_callgraph.erl @@ -755,6 +755,7 @@ put_behaviour_api_calls(Calls, -spec to_dot(callgraph(), file:filename()) -> 'ok'. to_dot(#callgraph{digraph = DG, esc = Esc} = CG, File) -> + %% TODO: handle Unicode names. Fun = fun(L) -> case lookup_name(L, CG) of error -> L; @@ -769,9 +770,10 @@ to_dot(#callgraph{digraph = DG, esc = Esc} = CG, File) -> -spec to_ps(callgraph(), file:filename(), string()) -> 'ok'. to_ps(#callgraph{} = CG, File, Args) -> + %% TODO: handle Unicode names. Dot_File = filename:rootname(File) ++ ".dot", to_dot(CG, Dot_File), - Command = io_lib:format("dot -Tps ~s -o ~s ~s", [Args, File, Dot_File]), + Command = io_lib:format("dot -Tps ~ts -o ~ts ~ts", [Args, File, Dot_File]), _ = os:cmd(Command), ok. -- cgit v1.2.3