#
# http://uncrustify.sourceforge.net/
#
# Source beautifier configuration which helps to create
# more consistent look to your source with the expected
# coding style in VICE
#
# Usage: "uncrustify -c uncrustify.cfg source.c"
#
# There's no guarantee the look is perfect after this
# but at least the most common stuff is corrected.
#
# Make sure to use the latest version.
#

# no cr/lf
newlines = lf

# no tabs
indent_with_tabs = 0

# small indents
indent_columns = 4

# Spaces to indent '{' from 'case'.
# By default, the brace will appear under the 'c' in case.
# Usually set to 0 or indent_columns.
indent_case_brace = 4

# Spaces to indent 'case' from 'switch'
# Usually 0 or indent_columns.
indent_switch_case = 4

# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
sp_arith = force

# Add or remove space around assignment operator '=', '+=', etc
sp_assign = force

# Add or remove space around boolean operators '&&' and '||'
sp_bool = force

# Add or remove space around compare operator '<', '>', '==', etc
sp_compare = force

# Add or remove space around the ':' in 'b ? t : f'
sp_cond_colon = force

# Add or remove space around the '?' in 'b ? t : f'
sp_cond_question = force

# Add or remove space between nested parens
sp_paren_paren = remove

# Add or remove space inside '(' and ')'
sp_inside_sparen = remove

# Add or remove space between 'else' and '{' if on the same line
sp_else_brace = force

# Add or remove space between '}' and 'else' if on the same line
sp_brace_else = force

# Add or remove space inside a non-empty '[' and ']'
sp_inside_square = remove

# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
sp_before_sparen = force

# Add or remove space after ','
sp_after_comma = force

# Add or remove space before ','
sp_before_comma = remove

# Add or remove space between ')' and '{'
sp_paren_brace = force

# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
sp_after_sparen  = force

# Add or remove space after ';', except when followed by a comment. Default=Add
sp_after_semi = force

# Add or remove newline between '}' and 'else'
nl_brace_else = remove

# Add or remove newline between 'enum' and '{'
nl_enum_brace = remove

# Add or remove newline between 'struct and '{'
nl_struct_brace = remove

# Add or remove newline between 'union' and '{'
nl_union_brace = remove

# Whether to put a newline after brace open.
# This also adds a newline before the matching brace close.
nl_after_brace_open = true

# Add or remove newline between 'if' and '{'
nl_if_brace = remove

# Add or remove newline between 'else' and '{'
nl_else_brace = remove

# Add or remove newline between 'switch' and '{'
nl_switch_brace = remove

# Add or remove newline at the end of the file
nl_end_of_file = force

# Add or remove newline between function signature and '{'
nl_fdef_brace = force

# Whether to remove blank lines after '{'
eat_blanks_after_open_brace = true

# Whether to remove blank lines before '}'
eat_blanks_before_close_brace = true

# Add or remove braces on single-line 'do' statement
mod_full_brace_do = force

# Add or remove braces on single-line 'for' statement
mod_full_brace_for = force

# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
mod_full_brace_if = force

# Add or remove braces on single-line 'while' statement
mod_full_brace_while = force

# Whether to remove superfluous semicolons
mod_remove_extra_semicolon = true

# Whether to put a newline after a brace close.
# Does not apply if followed by a necessary ';'.
nl_after_brace_close = true

# If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
# Default is true.
cmt_indent_multi = false
