@@ -90,8 +90,7 @@ const char *ui_message_handlert::level_string(unsigned level)
90
90
91
91
void ui_message_handlert::print (
92
92
unsigned level,
93
- const std::string &message,
94
- bool preformatted)
93
+ const std::string &message)
95
94
{
96
95
if (verbosity>=level)
97
96
{
@@ -100,7 +99,7 @@ void ui_message_handlert::print(
100
99
case uit::PLAIN:
101
100
{
102
101
console_message_handlert console_message_handler;
103
- console_message_handler.print (level, message, preformatted );
102
+ console_message_handler.print (level, message);
104
103
}
105
104
break ;
106
105
@@ -109,7 +108,7 @@ void ui_message_handlert::print(
109
108
{
110
109
source_locationt location;
111
110
location.make_nil ();
112
- print (level, message, -1 , location, preformatted );
111
+ print (level, message, -1 , location);
113
112
}
114
113
break ;
115
114
}
@@ -120,18 +119,17 @@ void ui_message_handlert::print(
120
119
unsigned level,
121
120
const std::string &message,
122
121
int sequence_number,
123
- const source_locationt &location,
124
- bool preformatted)
122
+ const source_locationt &location)
125
123
{
126
- message_handlert::print (level, message, preformatted );
124
+ message_handlert::print (level, message);
127
125
128
126
if (verbosity>=level)
129
127
{
130
128
switch (get_ui ())
131
129
{
132
130
case uit::PLAIN:
133
131
message_handlert::print (
134
- level, message, sequence_number, location, preformatted );
132
+ level, message, sequence_number, location);
135
133
break ;
136
134
137
135
case uit::XML_UI:
@@ -147,7 +145,7 @@ void ui_message_handlert::print(
147
145
std::string sequence_number_str=
148
146
sequence_number>=0 ?std::to_string (sequence_number):" " ;
149
147
150
- ui_msg (type, tmp_message, sequence_number_str, location, preformatted );
148
+ ui_msg (type, tmp_message, sequence_number_str, location);
151
149
}
152
150
break ;
153
151
}
@@ -158,20 +156,19 @@ void ui_message_handlert::ui_msg(
158
156
const std::string &type,
159
157
const std::string &msg1,
160
158
const std::string &msg2,
161
- const source_locationt &location,
162
- bool preformatted)
159
+ const source_locationt &location)
163
160
{
164
161
switch (get_ui ())
165
162
{
166
163
case uit::PLAIN:
167
164
break ;
168
165
169
166
case uit::XML_UI:
170
- xml_ui_msg (type, msg1, msg2, location, preformatted );
167
+ xml_ui_msg (type, msg1, msg2, location);
171
168
break ;
172
169
173
170
case uit::JSON_UI:
174
- json_ui_msg (type, msg1, msg2, location, preformatted );
171
+ json_ui_msg (type, msg1, msg2, location);
175
172
break ;
176
173
}
177
174
}
@@ -180,16 +177,8 @@ void ui_message_handlert::xml_ui_msg(
180
177
const std::string &type,
181
178
const std::string &msg1,
182
179
const std::string &msg2,
183
- const source_locationt &location,
184
- bool preformatted)
180
+ const source_locationt &location)
185
181
{
186
- if (preformatted)
187
- {
188
- // Expect the message is already an XML fragment.
189
- std::cout << msg1 << ' \n ' ;
190
- return ;
191
- }
192
-
193
182
xmlt result;
194
183
result.name =" message" ;
195
184
@@ -208,16 +197,8 @@ void ui_message_handlert::json_ui_msg(
208
197
const std::string &type,
209
198
const std::string &msg1,
210
199
const std::string &msg2,
211
- const source_locationt &location,
212
- bool preformatted)
200
+ const source_locationt &location)
213
201
{
214
- if (preformatted)
215
- {
216
- // Expect the message is already a JSON fragment.
217
- std::cout << " ,\n " << msg1;
218
- return ;
219
- }
220
-
221
202
json_objectt result;
222
203
223
204
if (location.is_not_nil () &&
0 commit comments