[MPlayer-dev-eng] [PATCH] printf --> mp_msg transition (multiple files)

The Wanderer inverseparadox at comcast.net
Sat Oct 16 04:15:10 CEST 2004


Reynaldo H. Verdejo Pinochet wrote:

> On Fri, Oct 15, 2004 at 09:41:25PM -0400, The Wanderer wrote:
> 
>> If necessary, if no one more competent (or at least more familiar
>> with the code) starts going through and correcting the MSG?_FIXMEs,
>> I may start doing that myself after the printfs are all gone. In
>> the meantime, however, in the absence of more pressure to do
>> otherwise I think I'll stick with my current policy.
> 
> been you an I the ppl doing most of the late printf/mp_msg work,
> maybe we can decide on a common policy and let the big brothers talk,
> 
I can agree with this in principle, but in practice it becomes more
difficult.

> been this the place to do so, i throw out my first:
> 
> 1.- Facing the need of replacing printf's with mp_mgs's, if the
> message states a clear error/warning, correct MSGL's should be used
> _not_ MSGL_FIXME.

I can see the sense of this, but the difficulty is, how to decide
whether something is a WARNing, an ERRor, or outright FATAL? (Or for
that matter, merely INFOrmative, or suchlike?)

FATAL should, IMO, be used only for things which exit immediately after
printing the message, but there may be some things which *should* exit
promptly but don't - in which case the correct thing to do is not use a
lower MSGL (ERR in this case), but to add the exiting code.

ERR and WARN are more difficult to distinguish, because the things which
are most obviously ERRors and not WARNings fall under the heading of
FATAL. I've used MSGL_ERR at least once so far, when it was blatantly
obvious that that level was correct - but as I said, I'm reluctant to
start using that as policy, because there may be times when I think of a
thing as being blatantly obvious but I'm wrong. When I'm doing it only
as the exception to a rule, that's not likely to happen - but if I start
doing it as *part* of a rule, I know from experience in other areas that
I can very easily go overboard.

If you have any ways to handle these sorts of issues, I'd be glad to
hear of them, but in the meantime...

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

A government exists to serve its citizens, not to control them.




More information about the MPlayer-dev-eng mailing list