#
# AMX Mod X style for Pawn (or as close as possible)
#

#######################
# Basic Indenting Stuff

# (a/i/r) comment notation for add/ignore/remove which is the actual setting
input_tab_size      = 1    # tab size on input file: usually 8
output_tab_size     = 8    # tab size for output: usually 8
indent_columns      = 8    # ie 3 or 8
indent_with_tabs    = 2    # 1=only to the 'level' indent, 2=use tab indenting
#indent_paren_nl     = 1    # indent-align under paren for open followed by nl

pp_indent           = remove # indent preproc 1 space per level (a/i/r)
pp_space            = remove # spaces between # and word (add/ignore/remove)

#indent_switch_case  = 1    # spaces to indent case from switch
#indent_case_brace   = 0    # spaces to indent '{' from case
                            # (usually 0 or indent_columns)

#indent_brace         = 0    # spaces to indent '{' from level (usually 0)
indent_braces        = 0    # whether to indent the braces or not
#indent_label         = 0    # 0=left >0=col from left (absolute column),
                             # <0=sub from brace indent (relative column)

indent_align_string    = false # True/False - indent align broken strings
indent_col1_comment    = false # indent comments in column 1
indent_func_call_param = false # indent continued function calls to indent_columns otherwise index_columns + spaces to align with open paren.

indent_namespace    = true  # indent stuff inside namespace braces
indent_class        = true  # indent stuff inside class braces


############################
# Misc Inter-element Spacing
#  Force,Ignore,Add,Remove

# ignored by nl_*_brace = true
sp_paren_brace       = force  # space between ')' and '{'
sp_fparen_brace      = force  # space between ')' and '{' of function
sp_sparen_brace      = force  # space between ')' and '{' of if, while, etc

sp_after_cast        = force  # space after cast - "(int) a" vs "(int)a"

sp_before_byref      = force  # space before '&' of 'fcn(int& idx)'

sp_inside_fparen     = force  # space inside 'foo( xxx )' vs 'foo(xxx)'
sp_inside_fparens    = remove # space inside 'foo( )' vs 'foo()'
sp_inside_paren      = remove # space inside '+ ( xxx )' vs '+ (xxx)'
sp_inside_square     = remove # space inside 'byte[ 5 ]' vs 'byte[5]'
sp_inside_sparen     = force  # space inside 'if( xxx )' vs 'if(xxx)'
sp_inside_angle      = ignore # space inside '<>', as in '<class T>'

sp_before_sparen     = force  # space before '(' of 'if/for/while/switch'
sp_after_sparen      = force  # space after  ')' of 'if/for/while/switch'
                              # the do-while does not get set here

sp_before_angle      = ignore # space before '<>', as in '<class T>'
sp_after_angle       = ignore # space after  '<>', as in '<class T>'

sp_before_square     = ignore # space before single '['
sp_before_squares    = remove # space before '[]', as in 'byte []'

sp_paren_paren       = force  # space between nested parens - '( (' vs '(('

sp_return_paren      = remove # space between 'return' and '('
sp_sizeof_paren      = remove # space between 'sizeof' and '('

sp_after_comma       = force  # space after ','

sp_arith             = force  # space around + - / * etc
sp_bool              = force  # space around || &&
sp_compare           = force  # space around < > ==, etc
sp_assign            = force  # space around =, +=, etc

sp_func_def_paren    = remove # space between 'func' and '(' - "foo (" vs "foo("
sp_func_call_paren   = remove # space between 'func' and '(' - "foo (" vs "foo("
sp_func_proto_paren  = remove # space between 'func' and '(' - "foo (" vs "foo("
sp_func_class_paren  = remove # space between ctor/dtor and '('

#sp_type_func         = 1      # space between return type and 'func'
                               # a minimum of 1 is forced except for '*'


sp_special_semi         = remove # space empty stmt ';' on while, if, for
                                 # example "while (*p++ = ' ') ;"
sp_before_semi          = remove # space before all ';'
sp_inside_braces        = force  # space inside '{' and '}' - "{ 1, 2, 3 }"
sp_inside_braces_enum   = force  # space inside enum '{' and '}' - "{ a, b, c }"
sp_inside_braces_struct = force  # space inside struct/union '{' and '}'

sp_macro             = force  # space between macro and value, ie '#define a 6'
sp_macro_func        = force  # space between macro and value, ie '#define a 6'

sp_square_fparen     = remove # weird pawn stuff: native yark[rect](a[rect])
sp_after_tag         = remove # pawn: space after a tag colon


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

align_with_tabs       = true   # use tabs for aligning (0/1)
align_keep_tabs       = false  # keep non-indenting tabs
align_on_tabstop      = true   # always align on tabstops
align_nl_cont         = false  # align the back-slash \n combo (macros)
align_enum_equ_span   = 1      # align the '=' in enums
align_assign_span     = 1      # align on '='. 0=don't align
align_assign_thresh   = 0      # threshold for aligning on '='. 0=no limit
align_right_cmt_span  = 8      # align comment that end lines. 0=don't align
align_var_def_span    = 1      # align variable defs on variable (span for regular stuff)
align_var_def_thresh  = 0      # align variable defs threshold
align_var_def_inline  = true   # also align inline struct/enum/union var defs
align_var_def_star_style = 1   # the star is part of the variable name
align_var_def_colon   = false  # align the colon in struct bit fields
align_var_struct_span = 1      # span for struct/union (0=don't align)
align_pp_define_span  = 1      # align bodies in #define statements
align_pp_define_gap   = 1      # min space between define label and value "#define a <---> 16"

align_struct_init_span   = 1      # align structure initializer values
align_func_proto_span    = 1      # align function prototypes
align_number_right        = false  # right-align numbers (not fully supported, yet)
align_typedef_span       = 1      # align single-line typedefs
align_typedef_gap        = 1      # minimum spacing
align_typedef_star_style = 1      # Start aligning style
                                  # 0: '*' not part of type
                                  # 1: '*' part of the type - no space
                                  # 2: '*' part of type, dangling


#####################################
# Newline Adding and Removing Options
#        Add/Remove/Ignore

nl_fdef_brace        = add    # "int foo() {" vs "int foo()\n{"
nl_func_decl_start   = ignore # newline after the '(' in a function decl
nl_func_decl_args    = ignore # newline after each ',' in a function decl
nl_func_decl_end     = ignore # newline before the ')' in a function decl
nl_func_type_name    = ignore # newline between return type and func name in def
nl_func_var_def_blk  = 0      # newline after a block of variable defs
nl_before_case       = false  # newline before 'case' statement
nl_after_return      = false  # newline after return statement
nl_after_case        = false  # disallow nested "case 1: a=3;"
nl_fcall_brace       = add    # newline between function call and open brace
nl_squeeze_ifdef     = false  # no blanks after #ifxx, #elxx, or before #endif TRUE/F
nl_enum_brace        = ignore # nl between enum and brace
nl_struct_brace      = ignore # nl between struct and brace
nl_union_brace       = ignore # nl between union and brace
nl_assign_brace      = ignore # nl between '=' and brace
nl_class_brace       = ignore # nl between class name and brace
nl_namespace_brace   = ignore # nl between namespace name and brace

nl_do_brace          = add    # nl between do and {
nl_if_brace          = add    # nl between if and {
nl_for_brace         = add    # nl between for and {
nl_else_brace        = remove # nl between else and {
nl_while_brace       = add    # nl between while and {
nl_switch_brace      = add    # nl between switch and {
nl_brace_else        = remove # nl between } and else
nl_brace_while       = add    # nl between } and while of do stmt

nl_elseif_brace      = add    # nl between close paren and open brace in 'else if () {'

nl_define_macro      = 0      # alter newlines in #define macros
nl_start_of_file     = ignore # alter newlines at the start of file
nl_start_of_file_min = 0      # min number of newlines at the start of the file
nl_end_of_file       = ignore # alter newlines at the end of file
nl_end_of_file_min   = 0      # min number of newlines at the end of the file

pos_bool             = start  # end=move &&/|| to EOL ignore=gnore, start=move to SOL

#####################
# Blank Line Options

nl_before_block_comment   = 3   # before a block comment (stand-alone
                                # comment-multi), except after brace open
nl_after_func_body        = 3   # after the closing brace of a function body
nl_after_func_proto       = 3   # after each prototype
nl_after_func_proto_group = 3   # after a block of prototypes
nl_max                    = 3   # maximum consecutive newlines (3=2 lines)

eat_blanks_after_open_brace   = true  # remove blank lines after {
eat_blanks_before_close_brace = true  # remove blank lines before }

########################
# Code Modifying Options
# (non-whitespace)

mod_paren_on_return     = force  # add or remove paren on return
mod_full_brace_nl       = 1      # max number of newlines to span w/o braces
mod_full_brace_if       = ignore # add or remove braces on if
mod_full_brace_for      = ignore # add or remove braces on for
mod_full_brace_do       = ignore # add or remove braces on do
mod_full_brace_while    = ignore # add or remove braces on while
mod_pawn_semicolon      = True   # add optional semicolons
mod_full_brace_function = add    # add optional braces on Pawn functions


#######################
# Comment Modifications

cmt_star_cont    = true   # put a star on subsequent comment lines
cmt_cpp_to_c     = true   # convert CPP comments to C comments
cmt_cpp_group    = true   # if UO_cmt_cpp_to_c, try to group in one big C comment
cmt_cpp_nl_start = true   # put a blank /* at the start of a converted group
cmt_cpp_nl_end   = true   # put a nl before the */ in a converted group
