[FFmpeg-cvslog] r22946 - trunk/libavutil/log.c
Michael Niedermayer
michaelni
Fri Apr 23 09:59:06 CEST 2010
On Fri, Apr 23, 2010 at 12:56:16AM +0200, James Darnley wrote:
> On 23 April 2010 00:41, Michael Niedermayer <michaelni at gmx.at> wrote:
> > i think this could be done with fewer ifdefs
>
> Thy will be done.
> Removed 1, now has 1 duplicated line. I also changed the colours
> table to force the colours to be bright and then only use bright on
> the others if they were already
> log.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> 1f3afbe1891ed823108f9c593e538ef004661724 colours.diff
> Index: libavutil/log.c
> ===================================================================
> --- libavutil/log.c (revision 22948)
> +++ libavutil/log.c (working copy)
> @@ -24,7 +24,11 @@
> * logging functions
> */
>
> +#ifdef _WIN32
> +#include <windows.h>
> +#else
> #include <unistd.h>
> +#endif
unistd.h needs to be under ifdef?
> #include "avutil.h"
> #include "log.h"
>
> @@ -39,6 +43,26 @@
>
> #undef fprintf
> static void colored_fputs(int color, const char *str){
> +#ifdef _WIN32
> + int win_color_conv[] = { 0,
> + FOREGROUND_RED|FOREGROUND_INTENSITY,
> + FOREGROUND_GREEN|FOREGROUND_INTENSITY,
> + FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_INTENSITY,
> + FOREGROUND_BLUE|FOREGROUND_INTENSITY,
> + FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_INTENSITY,
> + FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY,
> + FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE,
> + FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE,
> + FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE };
these could be vertically aligned
also the last 3 will not make users happy on white background i suspect
isnt there some kind of "default" text color?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100423/d8b5b187/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list