[MPlayer-users] [PATCH] make cache2.c readable

Denis Vlasenko vda.linux at googlemail.com
Tue Aug 22 17:38:54 CEST 2006


Please do not remove my address from To/CC when replying.

On Tuesday 22 August 2006 05:19, Rich Felker wrote:
> On Mon, Aug 21, 2006 at 08:18:24PM +0200, Denis Vlasenko wrote:
> > Patch makes indentation consistent and adds
> > some whitespace so that code is easier to read.
> > Some long lines wrapped.
> > 
> > No real code changes.
> > 
> > Diffed against current svn. Please apply.
> 
> Most of these changes have nothing to do with unreadable indention or
> spacing, just changing things to meet your own preferences for
> indention size and whatnot.

I can format source to whatever indentation step you prefer,
just tell me what you like more. 2? 4? 8? 3?

> As such I don't think it's likely for them 
> to be applied.. If we applied a patch everytime someone had a
> different opinion about which indention style is best we'd have 100
> commits per day...

Sure. However, lines like this:

if(s->read_filepos<s->min_filepos) mp_msg(MSGT_CACHE,MSGL_ERR,"Ehh. s->read_filepos<s->min_filepos !!! Report bug...\n");

or this:

      if(s->stream->type!=STREAMTYPE_STREAM ||
          read<s->min_filepos || read>=s->max_filepos+s->seek_limit)

are really hard to read because (a) '->', '>' and '>='
look very similar without whitespace and (b) long lines
simply scroll off out of the window in my editor.
There should be some agreed-upon limit on line length.

Can you describe which changes do you find acceptable?
--
vda



More information about the MPlayer-users mailing list