File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -149,14 +149,16 @@ void gcc_message_handlert::print(
149149 if (!function.empty ())
150150 {
151151 if (!file.empty ())
152- dest+= id2string (file)+ " :" ;
152+ dest += command ( 1 ) + id2string (file) + " :" + command ( 0 ); // bold
153153 if (dest!=" " )
154154 dest+=' ' ;
155155 dest+=" In function '" +id2string (function)+" ':\n " ;
156156 }
157157
158158 if (!line.empty ())
159159 {
160+ dest += command (1 ); // bold
161+
160162 if (!file.empty ())
161163 dest+=id2string (file)+" :" ;
162164
@@ -168,9 +170,11 @@ void gcc_message_handlert::print(
168170 dest+=id2string (column)+" : " ;
169171
170172 if (level==messaget::M_ERROR)
171- dest+= " error: " ;
173+ dest += command ( 31 ) + " error: " ; // red
172174 else if (level==messaget::M_WARNING)
173- dest+=" warning: " ;
175+ dest += command (95 ) + " warning: " ; // bright magenta
176+
177+ dest += command (0 ); // reset
174178 }
175179
176180 dest+=message;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class console_message_handlert : public message_handlert
5454 bool use_SGR;
5555};
5656
57- class gcc_message_handlert : public message_handlert
57+ class gcc_message_handlert : public console_message_handlert
5858{
5959public:
6060 // aims to imitate the messages gcc prints
You can’t perform that action at this time.
0 commit comments