indent_macro_brace
Category: Indenting options
Type: boolean [false, true]
Default: true
How to indent within a macro followed by a brace on the same line
This allows reducing the indent in macros that have (for example)
`do { ... } while (0)` blocks bracketing them.
true: add an indent for the brace on the same line as the macro
false: do not add an indent for the brace on the same line as the macro
Default: true
| raw CPP code | indent_macro_brace=false | indent_macro_brace=true |
|---|---|---|
| /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } | /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } | /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } |
Not the best code for this option? See how to improve the .uds file used to generate these examples.