[Bug other/36150] colorize output of gcc
esigra at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue May 6 21:56:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list