2016-02-14 19:06:11 +00:00
|
|
|
# astylerc--custom options for astyle
|
|
|
|
|
2017-08-05 14:01:05 +00:00
|
|
|
# K&R style formatting/indenting with some tweaks.
|
2017-10-05 02:10:27 +00:00
|
|
|
style=allman
|
2016-02-14 19:06:11 +00:00
|
|
|
|
2017-08-05 14:01:05 +00:00
|
|
|
# Indent with a width of 4 spaces.
|
|
|
|
indent=spaces=4
|
2016-02-14 19:06:11 +00:00
|
|
|
|
|
|
|
# Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...).
|
|
|
|
break-blocks
|
|
|
|
|
|
|
|
# Remove extra space padding around parenthesis on the inside and outside.
|
|
|
|
unpad-paren
|
|
|
|
|
|
|
|
# Insert space padding around operators.
|
|
|
|
pad-oper
|
|
|
|
|
|
|
|
# Insert space padding after paren headers only (e.g. 'if', 'for', 'while'...).
|
|
|
|
pad-header
|
|
|
|
|
|
|
|
# Attach a pointer operator (*) to name (name) and reference operator (&)
|
|
|
|
# to type (type).
|
|
|
|
align-pointer=name
|
|
|
|
align-reference=type
|
|
|
|
|
2017-08-05 14:01:05 +00:00
|
|
|
# Add brackets to unbracketed one line conditional statements
|
|
|
|
# (e.g. 'if', 'for', 'while'...).
|
|
|
|
add-brackets
|
2016-02-14 19:06:11 +00:00
|
|
|
|
2017-10-05 02:10:27 +00:00
|
|
|
# Don't break one-line blocks.
|
|
|
|
keep-one-line-blocks
|
|
|
|
|
|
|
|
# Don't break complex statements and multiple statements residing on a single line.
|
|
|
|
keep-one-line-statements
|
|
|
|
|
2017-08-05 14:01:05 +00:00
|
|
|
# Converts tabs into spaces in the non-indentation part of the line.
|
|
|
|
convert-tabs
|
|
|
|
|
|
|
|
# try to shorten long lines to 80 characters
|
|
|
|
max-code-length=80
|
|
|
|
|
|
|
|
# Preserve the file date and time
|
|
|
|
preserve-date
|