[Spice-devel] [PATCH spice-server] style: Group together indentation sections

Christophe Fergeau cfergeau at redhat.com
Mon Feb 27 11:28:01 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Feb 23, 2017 at 05:37:53PM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  docs/spice_style.txt | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> index 99c8390..eb0e30e 100644
> --- a/docs/spice_style.txt
> +++ b/docs/spice_style.txt
> @@ -175,9 +175,12 @@ for (i = 0; i < 10; ++i) {
>      some_func(var, i * i + *ptr, &var, sizeof(var));
>  }
>  
> +Indentation
> +-----------
> +
>  [[function_indentation]]
>  Function Indentation
> ---------------------
> +~~~~~~~~~~~~~~~~~~~~
>  
>  * No spaces between function name to left bracket.
>  * Curly bracket start on new line.
> @@ -216,7 +219,7 @@ function(type1 arg1, type2 arg2,
>  ----
>  
>  Branching indentation
> ----------------------
> +~~~~~~~~~~~~~~~~~~~~~
>  
>  * Add space after a branch keyword and after the right bracket.
>  * Curly bracket starts on the same line the branch starts.
> @@ -283,7 +286,7 @@ default:
>  ----
>  
>  Types indentation
> ------------------
> +~~~~~~~~~~~~~~~~~
>  
>  [source,c]
>  ----
> @@ -309,7 +312,7 @@ union {
>  ----
>  
>  Vertical indentation
> ---------------------
> +~~~~~~~~~~~~~~~~~~~~
>  
>  Use one space no tabs and no vertical alignment.
>  [source,c]
> @@ -324,7 +327,7 @@ unsigned long f2(int a, char ch);
>  ----
>  
>  Multi line macro indentation
> -----------------------------
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
>  [source,c]
>  #define MACRO_NAME(a, b, c) {        \
> @@ -335,7 +338,7 @@ Multi line macro indentation
>  }
>  
>  Multi line array indentation
> -----------------------------
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
>  [source,c]
>  char *array[] = {
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170227/95481a3b/attachment.sig>


More information about the Spice-devel mailing list