[FFmpeg-devel] FFmpeg source code is no longer C99 because of GNUism called case ranges
Måns Rullgård
mans
Sat Jul 7 23:13:15 CEST 2007
Roman Shaposhnik <rvs at sun.com> writes:
> Hi,
>
> On Fri, 2007-07-06 at 10:37 +0200, Reimar D?ffinger wrote:
>> Hello,
>> On Thu, Jul 05, 2007 at 09:01:12PM -0700, Roman Shaposhnik wrote:
>> > On Thu, 2007-07-05 at 11:37 +0200, Michael Niedermayer wrote:
>> > > > + else if (avctx->sub_id == 0x20001000 ||
>> > > > + (avctx->sub_id >= 0x20100000 && avctx->sub_id < 0x201a0000)) {
>> > > > + s->low_delay=1;
>> > >
>> > > vertical align
>> >
>> > Do you want me to re-align the expression (avctx->...) or the
>> > statement (s->low_delay=1;) ?
>>
>> IIRC Micheal prefers the ifs like that:
>> else if ( avctx->sub_id == 0x20001000
>> || (avctx->sub_id >= 0x20100000 && avctx->sub_id < 0x201a0000))
>
> Well, hopefully this is the same thing Michael had in mind ;-) But we
> are supposed to find out soon.
I personally prefer to break lines after operators, like so:
else if(avctx->sub_id == 0x20001000 ||
avctx->sub_id >= 0x201a0000 && avctx->sub_id < 0x201a0000)
Others may prefer breaking before operators, but I find that
distasteful ;-)
Whichever way pleases you, please always break long lines at
low-precedence operators (which you did).
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list