@@ -29,23 +29,25 @@ Author: Peter Schrammel
29
29
30
30
void show_goto_functions (
31
31
const namespacet &ns,
32
+ message_handlert &message_handler,
32
33
ui_message_handlert::uit ui,
33
34
const goto_functionst &goto_functions,
34
35
bool list_only)
35
36
{
37
+ messaget msg (message_handler);
36
38
switch (ui)
37
39
{
38
40
case ui_message_handlert::uit::XML_UI:
39
41
{
40
42
show_goto_functions_xmlt xml_show_functions (ns, list_only);
41
- xml_show_functions (goto_functions, std::cout );
43
+ msg. status () << xml_show_functions. convert (goto_functions);
42
44
}
43
45
break ;
44
46
45
47
case ui_message_handlert::uit::JSON_UI:
46
48
{
47
49
show_goto_functions_jsont json_show_functions (ns, list_only);
48
- json_show_functions (goto_functions, std::cout );
50
+ msg. status () << json_show_functions. convert (goto_functions);
49
51
}
50
52
break ;
51
53
@@ -55,27 +57,32 @@ void show_goto_functions(
55
57
for (const auto &fun : goto_functions.function_map )
56
58
{
57
59
const symbolt &symbol = ns.lookup (fun.first );
58
- std::cout << ' \n '
59
- << symbol.display_name () << " /* " << symbol.name
60
- << (fun.second .body_available () ? " "
61
- : " , body not available" )
62
- << " */" ;
60
+ msg. status () << ' \n '
61
+ << symbol.display_name () << " /* " << symbol.name
62
+ << (fun.second .body_available () ? " "
63
+ : " , body not available" )
64
+ << " */" ;
63
65
}
64
66
65
- std::cout << std::endl ;
67
+ msg. status () << messaget::eom ;
66
68
}
67
69
else
68
- goto_functions.output (ns, std::cout);
70
+ {
71
+ goto_functions.output (ns, msg.status ());
72
+ msg.status () << messaget::eom;
73
+ }
69
74
70
75
break ;
71
76
}
72
77
}
73
78
74
79
void show_goto_functions (
75
80
const goto_modelt &goto_model,
81
+ message_handlert &message_handler,
76
82
ui_message_handlert::uit ui,
77
83
bool list_only)
78
84
{
79
85
const namespacet ns (goto_model.symbol_table );
80
- show_goto_functions (ns, ui, goto_model.goto_functions , list_only);
86
+ show_goto_functions (
87
+ ns, message_handler, ui, goto_model.goto_functions , list_only);
81
88
}
0 commit comments