[MPlayer-dev-eng] [PATCH 2/4] String handling audit/cleanup
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Mar 4 10:31:52 CET 2007
Hello,
On Sun, Mar 04, 2007 at 09:56:07AM +0100, Nico Sabbi wrote:
> Reimar Döffinger wrote:
> >On Sat, Mar 03, 2007 at 05:26:46PM +0100, Nico Sabbi wrote:
> >>yes, but this is much better
> >>
> >>Index: stream_dvd.c
> >>===================================================================
> >>--- stream_dvd.c (revisione 22422)
> >>+++ stream_dvd.c (copia locale)
> >>@@ -867,10 +867,10 @@
> >> if (DVDDiscID(dvd, discid) >= 0)
> >> {
> >> int i;
> >>- char buf[33];
> >>+ mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_DISC_ID=");
> >> for (i = 0; i < 16; i ++)
> >>- sprintf(buf+2*i, "%02X", discid[i]);
> >>- mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_DISC_ID=%s\n", buf);
> >>+ mp_msg(MSGT_IDENTIFY, MSGL_V, "%02X", discid[i]);
> >>+ mp_msg(MSGT_IDENTIFY, MSGL_V, "\n");
> >> }
> >> }
> >> /**
> >
> >
> >I think this is the best solution for these things, but I'd still like
> >to mention that it might mess up things a bit with the color console
> >(though that could and should be fixed in mp_msg.c if anything).
> >
>
> applied. Why printing %X numbers messes up the color console?
Well, the color code escape sequence will be printed in-between, which
would be a problem for anything trying to parse it.
Not a big issue though IMO, coloured output is "experimental" anyway.
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list