1#
2# http://uncrustify.sourceforge.net/
3#
4# Source beautifier configuration which helps to create
5# more consistent look to your source with the expected
6# coding style in VICE
7#
8# Usage: "uncrustify -c uncrustify.cfg source.c"
9#
10# There's no guarantee the look is perfect after this
11# but at least the most common stuff is corrected.
12#
13# Make sure to use the latest version.
14#
15
16# no cr/lf
17newlines = lf
18
19# no tabs
20indent_with_tabs = 0
21
22# small indents
23indent_columns = 4
24
25# Spaces to indent '{' from 'case'.
26# By default, the brace will appear under the 'c' in case.
27# Usually set to 0 or indent_columns.
28indent_case_brace = 4
29
30# Spaces to indent 'case' from 'switch'
31# Usually 0 or indent_columns.
32indent_switch_case = 4
33
34# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
35sp_arith = force
36
37# Add or remove space around assignment operator '=', '+=', etc
38sp_assign = force
39
40# Add or remove space around boolean operators '&&' and '||'
41sp_bool = force
42
43# Add or remove space around compare operator '<', '>', '==', etc
44sp_compare = force
45
46# Add or remove space around the ':' in 'b ? t : f'
47sp_cond_colon = force
48
49# Add or remove space around the '?' in 'b ? t : f'
50sp_cond_question = force
51
52# Add or remove space between nested parens
53sp_paren_paren = remove
54
55# Add or remove space inside '(' and ')'
56sp_inside_sparen = remove
57
58# Add or remove space between 'else' and '{' if on the same line
59sp_else_brace = force
60
61# Add or remove space between '}' and 'else' if on the same line
62sp_brace_else = force
63
64# Add or remove space inside a non-empty '[' and ']'
65sp_inside_square = remove
66
67# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
68sp_before_sparen = force
69
70# Add or remove space after ','
71sp_after_comma = force
72
73# Add or remove space before ','
74sp_before_comma = remove
75
76# Add or remove space between ')' and '{'
77sp_paren_brace = force
78
79# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
80sp_after_sparen  = force
81
82# Add or remove space after ';', except when followed by a comment. Default=Add
83sp_after_semi = force
84
85# Add or remove newline between '}' and 'else'
86nl_brace_else = remove
87
88# Add or remove newline between 'enum' and '{'
89nl_enum_brace = remove
90
91# Add or remove newline between 'struct and '{'
92nl_struct_brace = remove
93
94# Add or remove newline between 'union' and '{'
95nl_union_brace = remove
96
97# Whether to put a newline after brace open.
98# This also adds a newline before the matching brace close.
99nl_after_brace_open = true
100
101# Add or remove newline between 'if' and '{'
102nl_if_brace = remove
103
104# Add or remove newline between 'else' and '{'
105nl_else_brace = remove
106
107# Add or remove newline between 'switch' and '{'
108nl_switch_brace = remove
109
110# Add or remove newline at the end of the file
111nl_end_of_file = force
112
113# Add or remove newline between function signature and '{'
114nl_fdef_brace = force
115
116# Whether to remove blank lines after '{'
117eat_blanks_after_open_brace = true
118
119# Whether to remove blank lines before '}'
120eat_blanks_before_close_brace = true
121
122# Add or remove braces on single-line 'do' statement
123mod_full_brace_do = force
124
125# Add or remove braces on single-line 'for' statement
126mod_full_brace_for = force
127
128# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
129mod_full_brace_if = force
130
131# Add or remove braces on single-line 'while' statement
132mod_full_brace_while = force
133
134# Whether to remove superfluous semicolons
135mod_remove_extra_semicolon = true
136
137# Whether to put a newline after a brace close.
138# Does not apply if followed by a necessary ';'.
139nl_after_brace_close = true
140
141# If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
142# Default is true.
143cmt_indent_multi = false
144