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

Ramiro Polla ramiro.polla
Fri Jun 4 05:23:59 CEST 2010


On Sun, May 2, 2010 at 7:01 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> This patch now makes ansi and win32 exclusive so that ansi is not possible
> on win32 anymore.
> Is this intended?

I don't see why that would be wanted. Cygwin builds don't compile the
_WIN32 code, and they're left with whatever they already support (btw
the red & underline cases in the cygwin terminal print out light blue
instead, but we don't care). If someone with a real use case and
really interested in supporting ansi in Windows shows up, we can
figure out what to do later.

Attached are 2 alternate attempts at this. Each contain 3 patches
(alt1_* and alt2_*).

alt1 does not share code:
static void colored_fputs(int level, const char *str){
#ifdef _WIN32
#else
#endif
}

alt2 does this:
static void colored_fputs(int level, const char *str){
if (use_color < 0)
#ifdef _WIN32
#else
#endif
}
<generic code through defines>
}

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt1_0001-Move-use_ansi_color-inside-the-only-function-that-us.patch
Type: application/octet-stream
Size: 795 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt1_0002-Move-array-of-colors-into-colored_fputs.patch
Type: application/octet-stream
Size: 1772 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt1_0003-Support-Win32-console-color-output.patch
Type: application/octet-stream
Size: 1996 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt2_0001-Rename-use_ansi_color-to-use_color.patch
Type: application/octet-stream
Size: 1173 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt2_0002-Move-ansi-color-array-to-outside-of-av_log_default_c.patch
Type: application/octet-stream
Size: 1848 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt2_0003-Add-win32-console-color-output.patch
Type: application/octet-stream
Size: 1989 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100604/60c8a972/attachment-0005.obj>



More information about the ffmpeg-devel mailing list