This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/36150] colorize output of gcc



------- Comment #8 from esigra at gmail dot com  2008-05-06 21:55 -------
(In reply to comment #7)
> If you added escape sequences to the string constants in the gcc source
> then it would only work for the C locale messages.

Adding escape sequences for colours would work as well with localization as any
other formatting. Simple example:

printf("%s%s%s%s", warning_format_start, _("warning: "), _("the actual
message"), warning_format_end);

Here warning_format_start may be a pointer to "<orange>" and warning_format_end
a pointer to "</orange>". If colours are disabled, they both point to "". So
the result might be "warning: the actual message" or "<orange>warning: the
actual message</orange>". Localization would work fine for both "warning: " and
"the actual message". I do not really see the problem that you were thinking
of.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36150


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]