Menu

#162 extern "C" (with no #ifdef __cplusplus)

open
nobody
2020-08-07
2012-06-14
Amit S
No

hi,
I am using AStyle to indent/format our codebase (> 5 million lines) and AStyle is a life-saver (fast and works like a charm! thanks).
I am hitting an issue with extern "C" --> i downloaded and patched version 336 from SVN and that took care of most problems but not all.
I want a way to not indent when there's extern "C" { NOT enclosed in "#ifdef __cplusplus"

Here's an example:
extern "C" {
int abcd;
char* somename;

void some_function_declared_with_c_linkage(int param1, short param2);
}

If you can send me pointers, then I can make changes in my local installation and get going (and then submit back for your review )

Discussion

  • Amit S

    Amit S - 2012-06-14

    File has code which should not be indented

     
  • Amit S

    Amit S - 2012-06-14
    • priority: 5 --> 8
     
  • Oscar Kramer

    Oscar Kramer - 2020-08-07

    Note from the future... Any progress here? 3.1 still indenting extern.

     

Log in to post a comment.