[FFmpeg-devel] [PATCH] add colours to warnings and errors

James Darnley james.darnley
Tue Apr 27 00:43:51 CEST 2010


2010/4/27 M?ns Rullg?rd <mans at mansr.com>:
> James Darnley <james.darnley at gmail.com> writes:
>
>> Right. ?See attached
>>
>> Index: libavutil/log.c
>> ===================================================================
>> --- libavutil/log.c ? (revision 22960)
>> +++ libavutil/log.c ? (working copy)
>> @@ -24,6 +24,10 @@
>> ? * logging functions
>> ? */
>>
>> +#ifdef _WIN32
>> +#include <windows.h>
>> +#include <string.h>
>> +#endif
>> ?#include <unistd.h>
>> ?#include <stdlib.h>
>> ?#include "avutil.h"
>> @@ -34,18 +38,76 @@
>> ?#endif
>> ?int av_log_level = AV_LOG_INFO;
>>
>> +/* FIXME: On Windows isatty() returns true when ANSI color codes won't work.
>> +Some hack to detect output to other terminals would be good, fixing the other
>> +terminals would be better. One probable exception is when the user has
>> +ANSI.SYS loaded but the Windows API should then still work. */
>
> You still have a FIXME here. ?That's not acceptable.

I'll delete it then if that'll satisfy you.  Or would you prefer the
whole text to be gone.  Then people will just be unaware of this
limitation.  Perhaps you want the ansi-color-on-windows gone too since
at present it will never get used.  There is _one_ case where they
could be used but I am unsure as how to detect it at present.  That
would be if TERM is "cygwin" and then CYGWIN has "notty" or CYGWIN
does not have "tty".



More information about the ffmpeg-devel mailing list