#118 Don't touch preprocessor indent


Sometimes we like to have indentation of preprocessor statements, but Astyle forces all preprocessor statements to be left aligned (no indentation). Is it possible to have an option, so the preprocessor indentation checks are ignored.


Example :
We like to have

#ifdef xxx
^^#define yyy zzz
^^#define yyy www

But astyle changes it to

#ifdef xxx
#define yyy zzz
#define yyy www


  • Jim Pattee

    Jim Pattee - 2013-10-09

    Option in SVN.

  • Jim Pattee

    Jim Pattee - 2013-10-09
    • status: open --> open-fixed
    • assigned_to: Jim Pattee
    • Group: --> 1.15.3
    • Priority: 5 --> 7
  • Jim Pattee

    Jim Pattee - 2013-11-05
    • status: open-fixed --> closed-fixed
  • Alex pap

    Alex pap - 2014-05-05

    This issue hasn't been fixed. What was added was the ability to indent "preprocessor statements to the same level as the source code".
    What we want is to indent code inside preprocessor conditional statements, e.g.

    #if defined(HAVE_REALPATH)
        #include <limits.h>


    #if DEBUG
    Last edit: Alex pap 2014-05-05

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks