[Ffmpeg-devel] [PATCH] indentation cosmetics
Michel Bardiaux
mbardiaux
Wed Aug 30 14:03:24 CEST 2006
Michael Niedermayer wrote:
> Hi
>
> On Wed, Aug 30, 2006 at 12:16:44PM +0200, Michel Bardiaux wrote:
>> Michael Niedermayer wrote:
>>> Hi
>>>
>>> On Wed, Aug 30, 2006 at 10:35:19AM +0200, Michel Bardiaux wrote:
>>>> Changes made by emacs 21.4.1 with settings:
>>>>
>>>> c-set-style cc-mode
>>>> set-variable indent-tabs-mode nil
>>> rejected of course
>>>
>>> [...]
>> I dont understand at all. I thought I understood the rules: no hard
>> tabs, tabwidth 4, and my settings seemed to match that. What is the problem?
>
> there are no tabs in svn and the indention of the lines you changed was
> correct, it doesnt seem correct after your change tough
>
> [...]
> Index: libavformat/img2.c
> ===================================================================
> --- libavformat/img2.c (revision 6126)
> +++ libavformat/img2.c (working copy)
> @@ -106,7 +106,7 @@
> for(first_index = 0; first_index < 5; first_index++) {
> if (get_frame_filename(buf, sizeof(buf), path, first_index) < 0){
> *pfirst_index =
> - *plast_index = 1;
> + *plast_index = 1;
It continues the previous statement (the *pfirst_index =) so it should
be indented one level more than the statement it continues.
> return 0;
> }
> if (url_exist(buf))
> @@ -142,7 +142,7 @@
> *pfirst_index = first_index;
> *plast_index = last_index;
> return 0;
> - fail:
> + fail:
> return -1;
> }
>
Mmm, most of the fail: labels at function level seem indented by 1
space, but there are exceptions:
nsvdec.c line 489, zero spaces.
sgi.c line 212, zero spaces.
utils.c line 2601, zero spaces.
What's the rule? And is there some emacs setting that enforces all the
rules?
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
More information about the ffmpeg-devel
mailing list