# Uncrustify >= 0.63

### MPlayer coding style

###### TODO/FIXME ###
###
### - Align comments?
###
######

#
# General options
#

# The type of line endings
newlines                                  = lf       # auto/lf/crlf/cr

#
# Indenting
#

# The number of columns to indent per level.
# Usually 2, 3, 4, or 8.
indent_columns                            = 4        # number

# How to use tabs when indenting code
# 0=spaces only
# 1=indent with tabs to brace level, align with spaces
# 2=indent and align with tabs, using spaces when not on a tabstop
indent_with_tabs                          = 0        # number

# Whether to indent strings broken by '\' so that they line up
indent_align_string                       = true     # false/true

#
# Spacing options
#

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

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

# Add or remove space around assignment '=' in enum
sp_enum_assign                            = force    # ignore/add/remove/force

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

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

# Add or remove space inside '(' and ')'
sp_inside_paren                           = remove   # ignore/add/remove/force

# Add or remove space between nested parens: '((' vs ') )'
sp_paren_paren                            = remove   # ignore/add/remove/force

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

# Add or remove space before pointer star '*'
sp_before_ptr_star                        = force    # ignore/add/remove/force

# Add or remove space between pointer stars '*'
sp_between_ptr_star                       = remove   # ignore/add/remove/force

# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star                         = remove   # ignore/add/remove/force

# Add or remove space after pointer star '*', if followed by a qualifier.
sp_after_ptr_star_qualifier               = force    # ignore/add/remove/force

# Add or remove space after a pointer star '*', if followed by a func proto/def.
sp_after_ptr_star_func                    = remove   # ignore/add/remove/force

# Add or remove space after a pointer star '*', if followed by an open paren (function types).
sp_ptr_star_paren                         = remove   # ignore/add/remove/force

# Add or remove space before a reference sign '&'
sp_before_byref                           = force    # ignore/add/remove/force

# Add or remove space before a reference sign '&' that isn't followed by a variable name
# If set to 'ignore', sp_before_byref is used instead.
sp_before_unnamed_byref                   = force    # ignore/add/remove/force

# Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc.
sp_before_sparen                          = force    # ignore/add/remove/force

# Add or remove space inside if-condition '(' and ')'
sp_inside_sparen                          = remove   # ignore/add/remove/force

# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while', etc.
sp_sparen_brace                           = force    # ignore/add/remove/force

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

# Add or remove space before '[' (except '[]')
sp_before_square                          = remove   # ignore/add/remove/force

# Add or remove space after ','
sp_after_comma                            = force    # ignore/add/remove/force

# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
sp_after_cast                             = remove   # ignore/add/remove/force

# Add or remove space between 'sizeof' and '('
sp_sizeof_paren                           = remove   # ignore/add/remove/force

# Add or remove space inside enum '{' and '}'
sp_inside_braces_enum                     = remove   # ignore/add/remove/force

# Add or remove space inside struct/union '{' and '}'
sp_inside_braces_struct                   = force    # ignore/add/remove/force

# Add or remove space inside '{' and '}'
sp_inside_braces                          = force    # ignore/add/remove/force

# Add or remove space inside '{}'
sp_inside_braces_empty                    = remove   # ignore/add/remove/force

# Add or remove space between return type and function name
# A minimum of 1 is forced except for pointer return types.
sp_type_func                              = remove   # ignore/add/remove/force

# Add or remove space between function name and '(' on function declaration
sp_func_proto_paren                       = remove   # ignore/add/remove/force

# Add or remove space between function name and '(' on function definition
sp_func_def_paren                         = remove   # ignore/add/remove/force

# Add or remove space inside empty function '()'
sp_inside_fparens                         = remove   # ignore/add/remove/force

# Add or remove space inside function '(' and ')'
sp_inside_fparen                          = remove   # ignore/add/remove/force

# Add or remove space between function name and '(' on function calls
sp_func_call_paren                        = remove   # ignore/add/remove/force

# Add or remove space between '__attribute__' and '('
sp_attribute_paren                        = remove   # ignore/add/remove/force

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

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

# Add or remove space between '}' and the name of a typedef on the same line
sp_brace_typedef                          = force    # ignore/add/remove/force

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

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

# Control the space after the opening of a C++ comment '// A' vs '//A'
sp_cmt_cpp_start                          = add      # ignore/add/remove/force

# TRUE: If space is added with sp_cmt_cpp_start, do it after doxygen sequences like '///', '///<', '//!' and '//!<'.
sp_cmt_cpp_doxygen                        = true     # false/true

#
# Code alignment (not left column spaces/tabs)
#

# How to align the star in variable definitions.
#  0=Part of the type     'void *   foo;'
#  1=Part of the variable 'void     *foo;'
#  2=Dangling             'void    *foo;'
align_var_def_star_style                  = 2        # number

# The span for aligning on '=' in assignments (0=don't align)
align_assign_span                         = 1        # number

# The threshold for aligning on '=' in assignments (0=no limit)
align_assign_thresh                       = 6        # number

# The span for aligning on '=' in enums (0=don't align)
align_enum_equ_span                       = 1        # number

# The span for aligning struct initializer values (0=don't align)
align_struct_init_span                    = 1        # number

# Whether to align macros wrapped with a backslash and a newline.
# This will not work right if the macro contains a multi-line comment.
align_nl_cont                             = true     # false/true

#
# Newline adding and removing options
#

# Add or remove newlines at the start of the file
nl_start_of_file                          = remove   # ignore/add/remove/force

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

# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
nl_end_of_file_min                        = 1        # number

# Add or remove newline between '=' and '{'
nl_assign_brace                           = remove   # ignore/add/remove/force

# Add or remove newline between 'enum' and '{'
nl_enum_brace                             = remove   # ignore/add/remove/force

# Add or remove newline between 'struct and '{'
nl_struct_brace                           = remove   # ignore/add/remove/force

# Add or remove newline between 'union' and '{'
nl_union_brace                            = remove   # ignore/add/remove/force

# Add or remove newline between 'if' and '{'
nl_if_brace                               = remove   # ignore/add/remove/force

# Add or remove newline between '}' and 'else'
nl_brace_else                             = remove   # ignore/add/remove/force

# Add or remove newline between 'else' and '{'
nl_else_brace                             = remove   # ignore/add/remove/force

# Add or remove newline between 'else' and 'if'
nl_else_if                                = remove   # ignore/add/remove/force

# Add or remove newline between 'for' and '{'
nl_for_brace                              = remove   # ignore/add/remove/force

# Add or remove newline between 'while' and '{'
nl_while_brace                            = remove   # ignore/add/remove/force

# Add or remove newline between 'do' and '{'
nl_do_brace                               = remove   # ignore/add/remove/force

# Add or remove newline between '}' and 'while' of 'do' statement
nl_brace_while                            = remove   # ignore/add/remove/force

# Add or remove newline between 'switch' and '{'
nl_switch_brace                           = remove   # ignore/add/remove/force

# Add or remove newline between return type and function name in a function definition
nl_func_type_name                         = remove   # ignore/add/remove/force

# Add or remove newline between return type and function name in a prototype
nl_func_proto_type_name                   = remove   # ignore/add/remove/force

# Add or remove newline between a function name and the opening '('
nl_func_paren                             = remove   # ignore/add/remove/force

# Add or remove newline between a function name and the opening '(' in the definition
nl_func_def_paren                         = remove   # ignore/add/remove/force

# Add or remove newline after '(' in a function declaration
nl_func_decl_start                        = remove   # ignore/add/remove/force

# Add or remove newline before the ')' in a function declaration
nl_func_decl_end                          = remove   # ignore/add/remove/force

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

# Whether to put a newline after semicolons, except in 'for' statements
nl_after_semicolon                        = true     # false/true

# Whether to put a newline after a virtual brace open with a non-empty body.
# These occur in un-braced if/while/do/for statement bodies.
nl_after_vbrace_open                      = true     # false/true

# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'. Does not affect the whole-file #ifdef.
nl_squeeze_ifdef                          = true     # false/true

#
# Blank line options
#

# The maximum consecutive newlines
nl_max                                    = 2        # number

# The number of newlines after '}' of a multi-line function body
nl_after_func_body                        = 2        # number

# The number of newlines after '}' of a single line function body
nl_after_func_body_one_liner              = 2        # number

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

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

#
# Code modifying options (non-whitespace)
#

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

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

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

# Add or remove braces on single-line 'using ()' statement
mod_full_brace_using                      = remove   # ignore/add/remove/force

# Add or remove unnecessary paren on 'return' statement
mod_paren_on_return                       = remove   # ignore/add/remove/force

# Whether to remove superfluous semicolons
mod_remove_extra_semicolon                = true     # false/true

#
# Comment modifications
#

# Whether to put a star on subsequent comment lines
cmt_star_cont                             = true     # false/true

# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
# the comment are the same length. Default=True
cmt_multi_check_last                      = false    # false/true

#
# Preprocessor options
#

# Control indent of preprocessors inside #if blocks at brace level 0 (file-level)
pp_indent                                 = remove   # ignore/add/remove/force

# Add or remove space after # based on pp_level of #if blocks
pp_space                                  = remove   # ignore/add/remove/force
