[MPlayer-dev-eng] [PATCH] Runtime colorful and/or module name output control

Zuxy Meng zuxy.meng at gmail.com
Wed Apr 9 10:24:17 CEST 2008


Hi,

2008/4/9, Diego Biurrun <diego at biurrun.de>:
> On Mon, Apr 07, 2008 at 04:20:11PM +0800, Zuxy Meng wrote:
> >
> > Hopefully this one is cleaner.
>
> It is, but..
>
> > --- mp_msg.c  ?????? 26340??
> > +++ mp_msg.c  ????????????
> > @@ -133,82 +218,11 @@
> >      }
> >  #endif
> >
> > -#ifdef MSG_USE_COLORS
> > -/* that's only a silly color test */
> > -#ifdef MP_ANNOY_ME
> > -    { int c;
> > -      static int flag=1;
> > -      if(flag)
> > -      for(c=0;c<24;c++)
> > -          printf("\033[%d;3%dm***  COLOR TEST %d  ***\n",(c>7),c&7,c);
> > -      flag=0;
> > -    }
> > -#endif
> > -    {   unsigned char v_colors[10]={9,1,3,15,7,2,2,8,8,8};
> > -        static const char *mod_text[MSGT_MAX]= {
> > -                                "GLOBAL",
> > -                                "CPLAYER",
> > -                                "GPLAYER",
>
> Is there a way to move this around less so that we get a smaller diff?

Or we can define the two static functions at the end of the file and
put a forward declaration. But I guess it looks somewhat strange and
inconsistent.

>
> > --- cfg-common.h      ?????? 26340??
> > +++ cfg-common.h      ????????????
> > @@ -9,6 +9,8 @@
> >       {"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
> > +     {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
> > +     {"msgmod", &mp_msg_mod, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
>
> This needs a documentation update.

Sure.
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the MPlayer-dev-eng mailing list