[FFmpeg-devel] [PATCH] add colours to warnings and errors
James Darnley
james.darnley
Sun Apr 25 00:45:22 CEST 2010
On 25 April 2010 00:00, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Apr 24, 2010 at 11:35:31PM +0200, James Darnley wrote:
>> On 24 April 2010 23:18, Michael Niedermayer <michaelni at gmx.at> wrote:
>>
>> >
>> > ? ?if(use_win_color){
>> > ? ?...
>> > ? ?}else
>> > #else
>> > ? ?{
>> > ? ? ? ?if(use_ansi_color<0){
>> > ? ?#if HAVE_ISATTY && !defined(_WIN32)
>> > ? ? ? ? ? ?use_ansi_color= getenv("TERM") && !getenv("NO_COLOR") && isatty(2);
>> > @@ -53,6 +121,7 @@
>> > ? ? ? ?if(use_ansi_color){
>> > ? ? ? ? ? ?fprintf(stderr, "\033[0m");
>> > ? ? ? ?}
>> > ? ?}
>> > #endif
>> >
>>
>> Was this a hint that you want if(use_win_color) before if(use_ansi_color)?
>
> no, i just meant to reduce the ifdefery and reduce the duplication of the
> ansi printing
As far as I can see, reducing the duplication would mean one more
ifdef for the "colour reset function"
More information about the ffmpeg-devel
mailing list