All pastes #904556 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-15 01:12 UTC
rendered paste body
Tab and Bracket Options:
------------------------
    default indent option
    If no indentation option is set,
    the default option of 4 spaces will be used.

    --indent=spaces=#   OR   -s#
    Indent using # spaces per indent. Not specifying #
    will result in a default of 4 spaces per indent.

    --indent=tab   OR   --indent=tab=#   OR   -t   OR   -t#
    Indent using tab characters, assuming that each
    tab is # spaces long. Not specifying # will result
    in a default assumption of 4 spaces per tab.

    --force-indent=tab=#   OR   -T#
    Indent using tab characters, assuming that each
    tab is # spaces long. Force tabs to be used in areas
    Astyle would prefer to use spaces.

    default brackets option
    If no brackets option is set,
    the brackets will not be changed.

    --brackets=break   OR   -b
    Break brackets from pre-block code (i.e. ANSI C/C++ style).

    --brackets=attach   OR   -a
    Attach brackets to pre-block code (i.e. Java/K&R style).

    --brackets=linux   OR   -l
    Break definition-block brackets and attach command-block
    brackets.

    --brackets=break-closing   OR   -y
    Break brackets before closing headers (e.g. 'else', 'catch', ...).
    Should be appended to --brackets=attach or --brackets=linux.

Indentation options:
--------------------
    --indent-classes   OR   -C
    Indent 'class' blocks, so that the inner 'public:',
    'protected:' and 'private: headers are indented in
    relation to the class block.

    --indent-switches   OR   -S
    Indent 'switch' blocks, so that the inner 'case XXX:'
    headers are indented in relation to the switch block.

    --indent-cases   OR   -K
    Indent case blocks from the 'case XXX:' headers.
    Case statements not enclosed in blocks are NOT indented.

    --indent-brackets   OR   -B
    Add extra indentation to '{' and '}' block brackets.

    --indent-blocks   OR   -G
    Add extra indentation entire blocks (including brackets).

    --indent-namespaces   OR   -N
    Indent the contents of namespace blocks.

    --indent-labels   OR   -L
    Indent labels so that they appear one indent less than
    the current indentation level, rather than being
    flushed completely to the left (which is the default).

    --indent-preprocessor   OR   -w
    Indent multi-line #define statements.

    --max-instatement-indent=#   OR   -M#
    Indent a maximal # spaces in a continuous statement,
    relative to the previous line.

    --min-conditional-indent=#   OR   -m#
    Indent a minimal # spaces in a continuous conditional
    belonging to a conditional header.

Formatting options:
-------------------
    --break-blocks   OR   -f
    Insert empty lines around unrelated blocks, labels, classes, ...

    --break-blocks=all   OR   -F
    Like --break-blocks, except also insert empty lines 
    around closing headers (e.g. 'else', 'catch', ...).

    --break-elseifs   OR   -e
    Break 'else if()' statements into two different lines.

    --pad=oper   OR   -p
    Insert space paddings around operators.

    --pad=paren   OR   -P
    Insert space padding around parenthesis on both the outside
    and the inside.

    --pad=paren-out   OR   -d
    Insert space padding around parenthesis on the outside only.

    --pad=paren-in   OR   -D
    Insert space padding around parenthesis on the inside only.

    --unpad=paren   OR   -U
    Remove unnecessary space padding around parenthesis.  This
    can be used in combination with the 'pad' options above.

    --one-line=keep-statements   OR   -o
    Don't break lines containing multiple statements into
    multiple single-statement lines.

    --one-line=keep-blocks   OR   -O
    Don't break blocks residing completely on one line.

    --convert-tabs   OR   -V
    Convert tabs to spaces.

    --fill-empty-lines   OR   -E
    Fill empty lines with the white space of their
    previous lines.

    --mode=c   OR   -c
    Indent a C, C++ or C# source file (this is the default).

    --mode=java   OR   -j
    Indent a Java(TM) source file.