[MPlayer-dev-eng] Correcting printf to mp_msg

Joey Parrish joey at nicewarrior.org
Sat Feb 7 16:54:22 CET 2004


On Sat, Feb 07, 2004 at 12:38:13PM +0100, Arpi wrote:
> I dont know this thread, but i'm against blind changing of printfs
> to MSGT_CPLAYER,MSGL_FIXME or sth like this.

> It's well defined what belongs to MSGT_CPLAYER, and what are the given
> levels are. Just read mp_msg.h:

Agreed, but what we're saying is that this mass conversion of printf's
would take so long to do correctly that nobody wants to do it.

By defining MSGL_FIXME and MSGT_FIXME, the conversion can be done by an
intelligent regular expression.  Once this is done, MSG?_FIXME will have
the same effect as MSGL_STATUS,MSGT_CPLAYER.  But now, it's easy to
identify the parts that need to be fixed.  Each developer can say
'grep -r MSG._FIXME *' in a folder of code he understands and fix them.

This is better than grepping for printf because:
1) no false positives. (snprintf for example)
2) with mp_msg ... _FIXME, there's no loss in functionality before
   they're fixed.
3) exclusive use of mp_msg (no printf) makes my life as a packager easier,
   even though the levels are _FIXME.  My win32 packages redirect mp_msg
   to a log file and do not create a terminal at all.  When some
   messages go missing, this sucks during debugging.

I am fully in favor of MSGT_FIXME and MSGL_FIXME as a temporary solution
to printf's.

--Joey

-- 
"Living in the complex world of the future is somewhat
like having bees live in your head.  But, there they are."




More information about the MPlayer-dev-eng mailing list