bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rfc] Colorized output for GNU make?


From: Eli Zaretskii
Subject: Re: [rfc] Colorized output for GNU make?
Date: Thu, 05 Jan 2012 22:46:57 +0200

> From: Paul Smith <address@hidden>
> Date: Thu, 5 Jan 2012 15:20:07 -0500
> Cc: address@hidden
> 
> The other thing I wonder about is the hardcoding of ASCII colorized
> strings and the start/stop character strings (\033[...).  Are there
> other methods of colorizing?

Yes.

> Should we try to support them?

I hope so.

> Maybe it's not worthwhile to try to support generic methods when we
> have no idea if they're useful.  We can always make changes needed
> to support them later.

The API for colorizing should not assume any specific character
sequences that need to be sent to the terminal.  In fact, it should
not assume the color is turned on or off by writing some characters at
all.  It could instead be a call to some system API.

The easiest way of abstracting this is to have a function that turns
on a given color, and another function that turns off a color and
returns to the default color.  ("Color" can actually be some other
attribute, like bold or blinking.)  There should be a way to do this
separately for foreground and background colors.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]