[MPlayer-dev-eng] [PATCH] ao_dart

Diego Biurrun diego at biurrun.de
Sun Mar 1 12:39:58 CET 2009


On Thu, Feb 26, 2009 at 09:12:37PM +0900, KO Myung-Hun wrote:
>
> Diego Biurrun wrote:
>> On Thu, Feb 26, 2009 at 05:02:09AM +0900, KO Myung-Hun wrote:
>>   
>>> [...]
>>>     
>>
>> Your patch fails to apply, so here is another round of nitpicks
>> instead of a commit...
>>
>>   
>>> --- libao2/ao_dart.c	(revision 0)
>>> +++ libao2/ao_dart.c	(revision 0)
>>> @@ -0,0 +1,332 @@
>>> +static int control(int cmd, void *arg)
>>> +{
>>> +    switch (cmd) {
>>> +        case AOCONTROL_GET_VOLUME :
>>
>> ...and the case at the same indentation depth as the switch.
>
> Fixed.

.. but only in one of two places ..

> But, now the closing bracket '}' of last case is placed on the same
> depth with the closing bracket '}' of switch. I think it's not good
> style.

Just look at what K&R really does: Indent the opening brace after 'case'.

>>> +    int     fShare       = 1;
>>> +    int     nDartSamples = DEFAULT_DART_SAMPLES;
>>> +    int     nBytesPerSample;
>>
>> weird amount of spaces
>
> Fixed.

No.

>>> +static int play(void *data, int len, int flags)
>>> +{
>>> +
>>> +     if (!(flags & AOPLAY_FINAL_CHUNK))
>>> +        len = (len / ao_data.outburst) * ao_data.outburst;
>>> +
>>> +     return write_buffer(data, len);
>>
>> one space indentation too much
>
> Fixed. I think you have a eagle's eye. ^^

Try the indent program, 'indent -i4 -kr -nut' is what trains my eyes.

>> Please make sure your patches really apply.
>
> Strange, it works fine here.

It worked here now as well, patch applied.

Diego



More information about the MPlayer-dev-eng mailing list