[FFmpeg-cvslog] r25385 - trunk/libavformat/mpegenc.c

Diego Biurrun diego
Fri Oct 8 11:35:57 CEST 2010


On Thu, Oct 07, 2010 at 09:40:39PM +0200, Michael Niedermayer wrote:
> 
> Anyway i will try to add some whitespace to be closer to indent -kr

How about these simple to follow rules (excerpted from a guide I was
asked to write @work):

- spacing:
  In general use spaces generously, i.e. place a space

    * between keywords and '(' (except for sizeof),
    * between ')' and '{',
    * around assignment and logical operators (=, +=, |=, &, &&, ||,..),
    * after ',' - for example in function arguments.

  but avoid spaces

    * between function names and '(',
    * inside '()'.

- brace placement:
  Opening braces should be kept on the same line as the corresponding
  statement, except for functions where the opening brace is placed
  on the next line.

- case statements are not indented separately, they remain at the
  same level as the corresponding switch statement.

- The function type should be kept on the same line as the function
  name.

- pointer stars go with the variable name,
  i.e. 'char *str' vs. 'char* str'

int foo(int arg, void *parm)
{
    char *var1;

    if (arg == 23)
        var1 = "success!\n";
}

Diego



More information about the ffmpeg-cvslog mailing list