[Mplayer-cvslog] CVS: main mp_msg.c,1.23,1.24
Pierre Lombard
p_l at gmx.fr
Sat Sep 13 12:54:58 CEST 2003
* D Richard Felker III <dalias at aerifal.cx> [2003-09-12 22:08]:
> On Fri, Sep 12, 2003 at 05:46:39PM +0200, pl CVS wrote:
> > Update of /cvsroot/mplayer/main
> > In directory mail:/var/tmp.root/cvs-serv17005
> >
> > Modified Files:
> > mp_msg.c
> > Log Message:
> > force a new line if a message is very long
> >
> >
> > Index: mp_msg.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/mp_msg.c,v
> > retrieving revision 1.23
> > retrieving revision 1.24
> > diff -u -r1.23 -r1.24
> > --- mp_msg.c 13 Jul 2003 14:43:28 -0000 1.23
> > +++ mp_msg.c 12 Sep 2003 15:46:16 -0000 1.24
> > @@ -68,6 +68,7 @@
> > va_start(va, format);
> > vsnprintf(tmp, MSGSIZE_MAX, mp_gettext(format), va);
> > va_end(va);
> > + tmp[MSGSIZE_MAX-2] = '\n';
> > tmp[MSGSIZE_MAX-1] = 0;
>
> WTF?!? This will overwrite one character of the message, and serves no
> purpose whatsoever. Please reverse!
It will overwrite one character _only if_ the message is more than
MSGSIZE_MAX-2 characters, and will add a '\n' if you have one sick message
of that length. (filename of 4242 characters for instance).
That way you'll get a proper shell prompt on the next line (as the \n of
the original long message is probably after the first MSGSIZE_MAX-2 bytes).
Granted it's some kind of aesthetics for sick people ;)
--
Best regards,
Pierre Lombard
More information about the MPlayer-cvslog
mailing list